Skip to content

Instantly share code, notes, and snippets.

@derekforeman
derekforeman / 0_reuse_code.js
Created January 20, 2014 15:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@derekforeman
derekforeman / logging2.json
Created February 4, 2016 19:29 — forked from pmav99/config2.json
Python 3 logging configuration using JSON
{
"logging": {
"version": 1,
"disable_existing_loggers": true,
"formatters": {
"brief": {
"class": "logging.Formatter",
"datefmt": "%I:%M:%S",
"format": "%(levelname)-8s; %(name)-15s; %(message)s"
},
@derekforeman
derekforeman / DumpAllWindowsCerts.cs
Created May 11, 2016 13:34 — forked from codingoutloud/DumpAllWindowsCerts.cs
Dump all digital certificates in Windows certificate store to stdout
// Iterates through all of the X.509 digital certificates installed in the certificate store
// on a Windows operating system, dumping out some metadata about each. Each certificate, in
// each Certificate Store, from each Certificate Location is included.
//
// Bill Wilder | @codingoutloud | Oct 2012
// Original: https://gist.github.com/4005661
using System;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
@derekforeman
derekforeman / FreeNAS.md
Created April 18, 2017 15:30 — forked from jacobblock/FreeNAS.md
Ultimate FreeNAS Setup

FreeNAS

I started using FreeNAS in August 2013. It is fantastic piece of software and I have been really impressed by the upgrades just in the few months I've been using it. It looks like they recently went to a plugin system as of version 9 to make installing software easier for end users. I've ran into several issues related to plugins and user + group permissions so I decided to just use the available FreeBSD port system. After fiddling for a few days (now turned into months) I believe I have created something helpful for the community and anyone interested in picking up the port system. The sandbox nature of FreeNAS's jail system is especially helpful for playing around without having any consequence on your core system.

Here are straight-forward instructions to setting up a bunch of different software on FreeNAS. If you make a terrible error, just throw up another plugin sandbox and repeat.

ToC

@derekforeman
derekforeman / app.py
Last active June 15, 2018 13:40
Refactor Treasurenite
def welcome():
print("Welcome to Treasurenite")
print("You come to a cave looking for treasure and find a split.\n ")
prYellow("Which way do you go?")
decision1()
def decision1():

Keybase proof

I hereby claim:

  • I am derekforeman on github.
  • I am derekforeman (https://keybase.io/derekforeman) on keybase.
  • I have a public key whose fingerprint is 0C51 690F 9524 BEB8 6791 389B DA5A C56F 7A24 C84C

To claim this, I am signing this object:

#Setting the prefix from C-b to C-a
set -g prefix C-a
#Free original C-b binding
unbind C-b
#setting the delay betwen prefix and command
set -s escape-time 1
#set base index for windows to 1 instead of 0
@derekforeman
derekforeman / tmux.md
Created March 5, 2020 16:33 — forked from hugodahl/tmux.md
Clean tmux cheat-sheet

Clean tmux cheat-sheet

By resources

sessions

list-sessions        ls         -- List sessions managed by server
new-session          new        -- Create a new session
using System;
using System.Net;
using System.Net.Http;
using System.Security.Principal;
using System.Text;
using System.Threading;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
using BloomAmcatStats.DAL;
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
Text("Hello World")
}
}
PlaygroundPage.current.setLiveView(ContentView())