This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# FILE: anowell.zsh-theme | |
# DESCRIPTION: oh-my-zsh theme file. | |
# AUTHOR: Anthony Nowell (anowell@gmail.com) | |
# VERSION: 1.0.0 | |
# SCREENSHOT: | |
# ------------------------------------------------------------------------------ | |
prompt_context() { | |
local user=`whoami` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#sets the victims desktop to beiber. | |
/usr/bin/curl https://gist.githubusercontent.com/jgagner/9393470/raw/6ea21b41c27f22cd9fd50d7659ab314b8bfd8403/belieber.jpg > /tmp/belieber.jpg.base64 | |
/usr/bin/base64 -D --input /tmp/belieber.jpg.base64 -o ~/belieber.jpg | |
/usr/bin/osascript -e "tell application \"System Events\" to set picture of every desktop to \"~/belieber.jpg\"" | |
#remind our victim they are beliebers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
WORDS = ['you', 'thou', 'you', 'they', 'this', 'that', 'here', 'there', 'who', | |
'what', 'where', 'when', 'how', 'not', 'all', 'many', 'some', 'few', 'other', | |
'one', 'two', 'three', 'four', 'five', 'big', 'long', 'wide', 'thick', 'heavy', | |
'small', 'short', 'narrow', 'thin', 'woman', 'man', 'man', 'child', 'wife', | |
'husband', 'mother', 'father', 'animal', 'fish', 'bird', 'dog', 'louse', 'snake', | |
'worm', 'tree', 'forest', 'stick', 'fruit', 'seed', 'leaf', 'root', 'bark', 'flower', | |
'grass', 'rope', 'skin', 'meat', 'blood', 'bone', 'fat', 'egg', 'horn', 'tail', | |
'feather', 'hair', 'head', 'ear', 'eye', 'nose', 'mouth', 'tooth', 'tongue', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import random | |
def apply(input): | |
if "ponder" in input: | |
mesg = ponderings[random.randint(0,len(ponderings)-1)] | |
else: | |
mesg = exclamations[random.randint(0,len(exclamations)-1)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to .bashrc or .profile or .zshrc or whatever you use... :) | |
# | |
# Examples: | |
# acurl algo/anowell/Pinky -X POST -d '"pondering"' -H "Content-Type: application/json" | |
# acurl data/.my/some_collection?force=true -X DELETE | |
function acurl() { | |
local aroute=$1 | |
local ahost=${ALGORITHMIA_API-https://api.algorithmia.com} | |
shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Expected behavior: | |
// 'abc', 'cba' => true | |
// 'abca', 'cba' => true | |
// 'cba', 'abca' => true | |
// '', '' => true | |
// 'abcd', 'abc' => false | |
// 'abc', 'abcd' => false | |
bool hasSameCharacters(char* c1, char* c2) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Expected behavior: | |
// 'abc', 'cba' => true | |
// 'abca', 'cba' => true | |
// 'cba', 'abca' => true | |
// '', '' => true | |
// 'abcd', 'abc' => false | |
// 'abc', 'abcd' => false | |
bool hasSameCharacters(char* c1, char* c2) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AnalogClock | |
attr_reader :hour, :min, :meridiem | |
def initialize(time) | |
return nil unless time.instance_of?(String) | |
# split on space and colon | |
split_time = time.split(/:| /) | |
return nil unless split_time.length == 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function to search for string in a set of files | |
# | |
# Add this function to ~/.bashrc | |
# Restart terminal or run: source ~/.bashrc | |
# Optionally set EDITOR in ~/.bash_profile (I use "EDITOR=subl") | |
# | |
# Examples: | |
# # Outputs filenames and matches of all found occurrences of "authenticate_user" in .rb files | |
# search *.rb "authenticate_user" | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bind prefix to tick, but let double-tick through | |
unbind ` | |
set -g prefix ` | |
bind-key ` send-key ` | |
# Ring the bell if any background window rang a bell | |
set -g bell-action any | |
# Default termtype. If the rcfile sets $TERM, that overrides this value. | |
set -g default-terminal screen-256color |
OlderNewer