Skip to content

Instantly share code, notes, and snippets.

View drnikki's full-sized avatar

Dr. Nikki Stevens drnikki

View GitHub Profile
@drnikki
drnikki / about.md
Created August 10, 2011 01:02 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@drnikki
drnikki / .gitconfig
Created November 30, 2011 18:58 — forked from joshuajabbour/.gitconfig
Git Config: Rename this file ".gitconfig" and place inside your home directory.
##
# This file should be renamed ".gitconfig" and placed inside your home directory.
##
[user]
name = YOUR_NAME
email = YOUR_EMAIL
[github]
user = YOUR_GITHUB_USERNAME
token = YOUR_GITHUB_TOKEN
@drnikki
drnikki / git last
Created November 30, 2011 18:59 — forked from joshuajabbour/git last
Shows all local and remote commits for X user over the last Y days. Add to your .gitconfig -- Usage: `git last Y X` (author name can be partial)
[alias]
last = "!fn() { S=1; A=`git config --get user.name`; if [ -n \"$1\" ]; then S=\"$1\"; shift; fi; if [ -n \"$1\" ]; then if [ \"$1\" != \"me\" ]; then A=\"$1\"; fi; shift; fi; git log -i --since=\"$S days ago\" --author=\"$A\" --branches --remotes --format='%C(yellow)%t%Creset %s (%an)' \"$@\"; }; fn"
@drnikki
drnikki / svn stuff
Created November 30, 2011 19:19
SVN enhancements / OSX
## View svn diff in color
$ brew install colordiff ( or port install colordiff)
$ vim ~/.subversion/config
# diff-cmd = diff_program (diff, gdiff, etc.)
diff-cmd = colordiff
## Customize those hideous colors
# started from http://blog.philippklaus.de/2011/09/colourful-svn-diff-on-mac-os-x/
$ vim ~/.colordiffrc
@drnikki
drnikki / gist:2254721
Created March 30, 2012 20:22
block id
text
text
<a href="
<?php
$url = current_path();
explode('/', $url);
var_dump($url);
if(is_numeric($url[1])) {
 $nid = $url[1];
echo "node/add/resume?=jobxyz=" . $nid;
@drnikki
drnikki / gist:2363348
Created April 11, 2012 23:00
Mustachifyit
/**
* MUSTACHES FOR EVERYONE... kind of.
*/
(function($) {
Drupal.behaviors.mustache = {
attach: function() {
$("img")
.mouseover(function() {
if ($acct = user_load_by_name('admin')) {
echo "loaded user";
// this loads the user's profile 2 data, of the profile2
if ($profiletwo = profile2_load_by_user($acct->uid, 'part_1')) {
// and this returns just the term id of what they selected
print_r($profiletwo->field_part1_skills);
}
else {
echo "cannot load profile";
}
@drnikki
drnikki / gist:2960578
Created June 20, 2012 15:45
Handy function to parse kanji out of sentences
function parseText(text) {
// simplified version of this guys' http://buildingonmud.blogspot.com/2009/06/convert-string-to-unicode-in-javascript.html
var charArray = text.split('');
var justKanji = [];
charArray.forEach( function(item) {
// rejection ranges found @unicodemap.com
// http://www.unicodemap.org/range/62/Hiragana/ & http://www.unicodemap.org/range/63/Katakana/
// 12352 - 12543
var unicode = item.charCodeAt(0);
@drnikki
drnikki / google_twunter_lol
Created July 30, 2012 20:04 — forked from jamiew/google_twunter_lol
All the dirty words from Google's "what do you love" project: http://www.wdyl.com/
easterEgg.BadWorder.list={
"4r5e":1,
"5h1t":1,
"5hit":1,
a55:1,
anal:1,
anus:1,
ar5e:1,
arrse:1,
arse:1,
@drnikki
drnikki / gist:3730281
Created September 15, 2012 23:09
git yo
git clone git@github.com:drnikki/laughing-cyril.git
cd laughing-cyril
echo "this is some text" >> rachel1.txt
git add rachel1.txt
git commit -m "I am my first commit"
git push origin master