Skip to content

Instantly share code, notes, and snippets.

@chartjes
chartjes / cycle-list.php
Created March 27, 2017 20:32
My PHP script for creating a Twitter list where people cycle on and off it based on 30 days of interaction
<?php
require "vendor/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
// You can get all these via https://dev.twitter.com/
$consumer_key = "";
$consumer_secret = "";
$access_token = "";
$access_token_secret = "";
$user_id = 0; // Twitter user ID
export PS1="\n${RED}\u⍟${NO_COLOR} at ${LIGHT_BLUE}\h${NO_COLOR} in ${GREEN}\w${NO_COLOR}\$(__git_ps1 ' on ${PINK}%s')\$(__hg_ps1 ' on ${PINK}%s')${NO_COLOR}\n\$ "
##
# Shell colors
# Note: In OS X Terminal, open preferences and make sure you check
# 'Display ANSI colors' and 'Use bright colors for bold text'
# then you can adjust each color and bright color variant there
##
BLACK="\[\e[0;30m\]" GREY="\[\e[1;30m\]" # in preferences: black
RED="\[\e[0;31m\]" BRIGHT_RED="\[\e[1;31m\]" # in preferences: red
GREEN="\[\e[0;32m\]" BRIGHT_GREEN="\[\e[1;32m\]" # in preferences: green

Stealing WiFi

/etc/hosts

This will let you access any google owned site. This includes: youtube, google cache, google translate, google search, gmail, google news, etc.

  • Install the HTTPS Everywhere extension
  • Add these rules to your /etc/hosts file
@iammerrick
iammerrick / .vimrc
Created March 20, 2014 23:12
My Rig
" Vundle
filetype off
" Plugins
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Vundle installed
@tkersey
tkersey / Undo a commit and redo
Created October 8, 2010 22:36
Git: undo a commit and redo
http://stackoverflow.com/questions/927358/git-undo-last-commit
Undo a commit and redo
$ git commit ...
$ git reset --soft HEAD^ (1)
$ edit (2)
$ git commit -a -c ORIG_HEAD (3)
This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message, or both. Leaves working tree as it was before "reset".