Skip to content

Instantly share code, notes, and snippets.

New computer setup

  • a/o 2015-05-27 *

Format the drive

  1. Restart with cmd-R or cmd-D
  2. Erase drive / 3x if second-handk
  3. Reinstall MacOS
@codedecay
codedecay / tmux.cheat
Last active August 29, 2015 14:27 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@codedecay
codedecay / gist:b880e3e14025a486e938
Last active August 29, 2015 14:27 — forked from nateware/gist:3915757
Start Mac VNC server from command line
# Step 1: Set priveleges
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
# Step 2: Allow VNC clients
@codedecay
codedecay / deepdream-install.md
Last active July 28, 2020 20:02 — forked from robertsdionne/deepdream-install.md
Deepdream installation
#!/usr/bin/env bash

# Assuming OS X Yosemite 10.10.4

# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
#!/bin/bash
## Install Gogs 0.6.3 on Ubuntu 14.04 LTS 64Bits
## Author: Nilton OS -- www.linuxpro.com.br
## Version: 0.2
echo 'install_gogs_ubuntu.sh'
echo 'Support Ubuntu/Debian'
echo 'Installs Gogs 0.6.3'
echo 'Requires Ubuntu 14.04+, Debian 7+'
@codedecay
codedecay / Dapper.fs
Last active August 29, 2015 14:27 — forked from vbfox/Dapper.fs
Minimal dapper in F#
module DapperFSharp =
open System.Data.SqlClient
open System.Dynamic
open System.Collections.Generic
open Dapper
let dapperQuery<'Result> (query:string) (connection:SqlConnection) =
connection.Query<'Result>(query)
let dapperParametrizedQuery<'Result> (query:string) (param:obj) (connection:SqlConnection) : 'Result seq =
@codedecay
codedecay / plot-compound-interest.py
Last active August 29, 2015 14:27 — forked from tom-galvin/plot-compound-interest.py
A Python/matplotlib script to animate compound interest with an increasing number of terms
# Python code to generate an animation showing compound interest taking place with
# increasingly smaller terms. You will require matplotlib to run this code.
# You'll also require ImageMagick installed to generate the .gif animation.
# You can find this at http://usn.pw/blog/maths/2015/04/09/compound-interest
import matplotlib.pyplot as mp
import matplotlib.animation as ma
def gen_data(steps):
"""Creates the data to be plotted in this animation frame."""
@codedecay
codedecay / clojure.md
Last active August 29, 2015 14:27
Setting Up Clojure on OS X

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

@codedecay
codedecay / LogModule.cs
Last active August 29, 2015 14:27 — forked from pawelpabich/LogModule.cs
Log4Net and NLog modules for Autofac
using System;
using System.Linq;
using Autofac;
using Autofac.Core;
using NLog;
using log4net;
using LogManager = NLog.LogManager;
namespace AutofacIdea
{
@codedecay
codedecay / EventStoreService.cs
Last active August 29, 2015 14:27 — forked from trbngr/EventStoreService.cs
EventStore as a windows service w/ TopShelf
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
namespace EventStoreService
{
public class EventStoreService
{