Skip to content

Instantly share code, notes, and snippets.

View drnikki's full-sized avatar

Dr. Nikki Stevens drnikki

View GitHub Profile
@joshuajabbour
joshuajabbour / .profile
Created March 10, 2011 18:44
Git Bash tools: Bash completion and shell prompt to list current branch/dirty status. Add this code to your .profile or .bash_profile or .bashrc.
##
# Bash completion scripts
##
if type brew > /dev/null 2>&1 && [ -f `brew --prefix`/etc/bash_completion ]; then
# Homebrew: http://mxcl.github.com/homebrew/
. `brew --prefix`/etc/bash_completion
fi
if [ -f /contrib/completion/git-completion.bash ]; then
@benbuckman
benbuckman / drupal-syslog-parser.js
Created November 29, 2011 17:56
node.js script to parse Drupal logs in linux syslog (and find distinct 404'd URLs)
// drupal log parser w/ node.js
// takes a filtered syslog file
// run as node `drupal-syslog-parser.js LOGPATH`
// [install dependencies (lazy,underscore) first with `npm install ___`]
var lazy = require('lazy')
, fs = require('fs')
, path = require('path')
, _ = require('underscore');
@msonnabaum
msonnabaum / drupal_issue_notify.rb
Created December 22, 2011 00:41
Script to notify you of new issues you're participating in via growl. Just pass it your drupal.org user id as the first arg.
#!/usr/bin/env ruby
require 'rubygems'
require 'rss/1.0'
require 'rss/2.0'
require 'zlib'
require 'open-uri'
require 'ruby_gntp'
require 'tempfile'
def store_dump(filename, obj)
@shichao-an
shichao-an / build_mysql.sh
Last active January 22, 2023 16:05
Build and install MySQL 5.1 from source on Ubuntu 14.04
#!/bin/bash
# Run as root
set -e
apt-get update
apt-get install -y build-essential
apt-get install -y libncurses5-dev
useradd mysql
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@elibosley
elibosley / archive-all-facebook-messages.js
Last active March 6, 2024 03:36 — forked from tedmiston/archive-all-facebook-messages.js
Archive all of the messages in your Facebook Messages Inbox
function archive_all(testOnly) {
messages = $("._5blh")
console.log("Found", messages.length, "messages on messsenger.");
if (!testOnly) {
for (i = 0; i < messages.length; i++) {
try {
messages[i].click()// open dialog
$("li:contains('Archive')").last().click()
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@TobiasWooldridge
TobiasWooldridge / gist:22f0cdca75190b9a473f
Last active April 4, 2024 20:03
How to Unbrick a Kindle Paperwhite

How to unbrick an Amazon Kindle Paperwhite™

This guide instructs you in how to unbrick an Amazon Kindle Paperwhite. The consequences of following it are your own responsibility. This method (opening the Kindle and using the serial interface) should be a last resort and should only be considered if other methods fail

The Guide

  1. Pry open Kindle using a prying tool
  2. Unscrew the screen and remove it from the base. Note that there's a screw hidden under the adhesive at the top in the middle
  3. Solder tin wire to serial ports on the bottom
  4. Attach tin wire to USB TTY device (order is ground, RX, TX, from the kindle's perspective, where GND is the smallest pad) and plug USB TTY device into your computer
  5. Open Putty on your computer in serial mode, with the serial port specified as your USB device and baud configured to 115200
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 7, 2024 01:38
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶