Skip to content

Instantly share code, notes, and snippets.

View dalanmiller's full-sized avatar
👨‍💻

dalan dalanmiller

👨‍💻
View GitHub Profile
@1328
1328 / aliens.py
Last active August 29, 2015 14:07
aliens - try
import random
from collections import defaultdict
from pprint import pprint
class City(object):
def __init__(self, data=None):
self.name = None
self.neighbors = {}
if data is not None:
@comerford
comerford / mongo_wt_zlib.conf
Last active January 9, 2017 12:08
YAML Config for MongoDB 2.7.9 - WiredTiger, zlib compression
storage:
dbPath: "/ssd/db/wt_zlib"
engine: "wiredTiger"
wiredTiger:
collectionConfig: "block_compressor=zlib"
systemLog:
destination: file
path: "/data/wt_zlib/mongodb.log"
processManagement:
fork: true
@wookiecooking
wookiecooking / aliases.sh
Created November 30, 2013 00:52
[Shell] Assortment of OSX influenced bash aliases and functions
# Rails Stuff
alias stoprails='kill -9 $(lsof -i :3000 -t)'
alias startrails='rails server -d'
alias restartrails='stopRails && startRails'
#Check PHP For Erroes
alias phpcheck='find ./ -name \*.php | xargs -n 1 php -l'
# ROT13-encode text. Works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'
@jmdobry
jmdobry / Instructions.md
Last active August 31, 2021 18:21
Nginx reverse-proxy for RethinkDB Admin UI

Start your rethinkdb instance with this flag: --bind all (or bind=all in the configuration file for your instance)

Block external access to the web UI with these two commands: sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j DROP sudo iptables -I INPUT -i eth0 -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT

Install nginx: sudo apt-get install nginx

@transkatgirl
transkatgirl / encodetwitter.sh
Last active October 29, 2022 11:33
Encode a video for uploading to Twitter using FFMPEG and FDKAAC
#!/bin/bash
# https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/uploading-media/media-best-practices
# - h.264 high profile
# - 60fps or less
# - aac-lc, he-aac not supported
# - 16:9 recommended
# - 512mb maximum
# - shorter than 140s
# - 1:1 pixel aspect ratio
# - yuv 4:2:0
@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@bsweger
bsweger / useful_pandas_snippets.md
Last active April 9, 2024 10:22
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 11, 2024 07:57
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 16, 2024 23:05
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@steven2358
steven2358 / ffmpeg.md
Last active April 19, 2024 05:16
FFmpeg cheat sheet