Skip to content

Instantly share code, notes, and snippets.

View noopkat's full-sized avatar
🐤
building my own birdfeeder on here

Suz Hinton noopkat

🐤
building my own birdfeeder on here
View GitHub Profile
#!/usr/bin/env ruby
# Aside from removing Ruby on Rails specific code this is taken verbatim from
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome
# - Ryan Florence (http://ryanflorence.com)
#
# Install this hook to a remote repository with a working tree, when you push
# to it, this hook will reset the head so the files are updated
if ENV['GIT_DIR'] == '.'
@dnagir
dnagir / deploy.rb
Created May 18, 2011 14:55
Flexible Rails deployment with Capistrano and Nginx
set :domain, ENV["domain"]
set :application, domain
set :user, ENV["user"]
set :destination, ENV["destination"] || domain
set :web_conf, ENV["web_conf"] || ENV["environment"] || 'production'
raise "please set domain=app.domain.name.com" unless domain
raise "please set user=server_username" unless user
set :port, ENV["port"] || 1234
set :repository, "."

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw

@will
will / gist:4198815
Created December 3, 2012 22:44
Gists and oAuth warning

Warning: Do not give third party apps the "create and edit gists" scope, if you have any private data in private gists.

me:

when I grant that privilege to a 3rd party app over oauth, not the web interface.

This dialog: http://f.cl.ly/items/3y1q1s2C2Z321y150F1B/Authorize%20access%20to%20your%20account.png

Create makes sense, they can create them on my behalf. But edit is much more ambiguous. Can that app edit the ones it creates itself? Or any gist I have? Or just the public ones?

@P4
P4 / default.reg
Last active April 13, 2024 05:23
Color schemes for Windows Command Prompt
Windows Registry Editor Version 5.00
; Default color scheme
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00000000
"ColorTable08"=dword:00808080
; BLUE LBLUE
@addyosmani
addyosmani / headless.md
Last active July 18, 2023 18:47
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

@ekinertac
ekinertac / nginx.conf
Created May 6, 2013 10:37
nginx: port forwarding
server{
listen 80;
server_name example.com;
access_log /home/path_to_site/access.log;
error_log /home/path_to_site/error.log;
location / {
proxy_pass http://0.0.0.0:8002;
proxy_set_header Host $host;
@evadne
evadne / About.md
Last active April 9, 2024 07:19
Create display override file to force Mac OS X to use RGB mode for Display.

Create display override file to force Mac OS X to use RGB mode for Display.

  • Dell (4268) = 0x40ac
  • U3011 (16485) = 0x4065: /System/Library/Displays/Overrides/DisplayVendorID-10ac/DisplayProductID-4065
  • U2713HM (16512) = 0x4080: /System/Library/Displays/Overrides/DisplayVendorID-10ac/DisplayProductID-4080

Credit: http://embdev.net/topic/284710; works for OS X 10.8 & last tested on 10.9 13A476u.