Skip to content

Instantly share code, notes, and snippets.

View connectthefuture's full-sized avatar

justthefracts connectthefuture

  • Midwest usa
View GitHub Profile
@peterhost
peterhost / node_debian_init.sh
Created November 25, 2010 11:41
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
#!/bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@kylefiedler
kylefiedler / css.snippets
Last active November 7, 2019 16:42
Vim CSS Snippets
#Sass Snippets
snippet @i
@import "${1}";
snippet ext
@extend ${1};
snippet inc
@include ${1}(${2});${3}
snippet @m
@media ${1} {
${2}
#!/bin/bash
WORK_DIR=/tmp/bombich-rsync
mkdir -p $WORK_DIR
cd $WORK_DIR
curl -O http://rsync.samba.org/ftp/rsync/src/rsync-3.0.7.tar.gz
tar -xzvf rsync-3.0.7.tar.gz
rm rsync-3.0.7.tar.gz
curl -O http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.0.7.tar.gz
@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
#!/bin/bash
SMBUSERNAME="macuser"
SMBPASSWORD="X*aHm7qNUg1)"
SMBMOUNT="/Volumes/Test/"
SMBSHARE="OfficeDoc$"
SMBHOST="192.168.140.20"
rm -rf $SMBMOUNT
mkdir $SMBMOUNT
@fairchild
fairchild / setup.sh
Created July 1, 2012 21:22
Setup a Ubuntu 12.04 server for serving a ruby and nodejs apps
#!/bin/bash
set -x
set -e
# Setup a new ubuntu 12.04 server
# this file can be used as the userdata file for a new instance.
# It should set any environments variables needed, and select which setup functions to run, in what order.
USERNAME=${1:-deploy}
APPNAME=${2:-deploy}
@brenthall
brenthall / Workstation.sh
Created July 3, 2012 05:21
Workstation Setup
brew install imagemagik
brew install nginx
sudo cp -r /Volumes/Development/config/nginx/* /usr/local/etc/nginx/*
# nginx will not run on port 80 by default
sudo cp /Volumes/Development/config/LaunchDaemons/org.nginx.nginx.plist /Library/LaunchDaemons/org.nginx.nginx.plist
# dealing with different versions of grails
@simX
simX / hidpi.txt
Created July 28, 2012 04:58
Enable HiDPI mode in Mountain Lion w/o Quartz Debug
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active April 16, 2025 07:11
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx