This file contains hidden or 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
if [[ -n $SSH_CONNECTION ]]; then | |
local ret_status="%(?:%{$fg_bold[yellow]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
else | |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
fi | |
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" |
This file contains hidden or 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/sh | |
amixer -D pulse sset Master $1 |
This file contains hidden or 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 AutoRenderer() { | |
var parser = new DOMParser(); | |
this.handles = []; | |
this.context = {}; | |
function Handle(scriptElement, context) { | |
var templateString = scriptElement.innerHTML; | |
this.template = Handlebars.compile(templateString); | |
this.context = context || {}; | |
this.element = scriptElement; | |
} |
This file contains hidden or 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 observeTree(object, cb) { | |
Object.observe(object, function (changes) { | |
if ((changes[0].type == "add" || changes[0].type == "update") && typeof changes[0].object[changes[0].name] == "object") { | |
observeTree(changes[0].object[changes[0].name], cb); | |
} | |
cb(changes); | |
}); | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
#cursor { | |
width: 48px; | |
height: 48px; | |
border-radius: 24px; |
This file contains hidden or 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/zsh | |
control_c() { | |
echo "Yes! You did it! "; | |
echo -n "Want more nyan? (y/n) " | |
read input | |
if [[ $input == "y" ]]; then | |
nc -v nyancat.dakko.us 23 | |
else | |
echo "Aww, bye! " |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
// #include <math.h> | |
#include <time.h> | |
#include <sys/time.h>// For `gettimeofday()` | |
#include <string.h> |
This file contains hidden or 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/zsh | |
# CONFIG | |
SERVER="example.com" | |
# Don't put trailing slashes btw. | |
REMOTEDIRECTORY="" # Set to "backup" to push to home directory of remote user. WARNING: Beginning with "/" will push to the remote root directory. | |
LOCALDIRECTORY="$HOME" | |
# REMOTEUSER="ambrosechua" | |
LOG=".homesync.log" |
This file contains hidden or 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
SHELL := /bin/zsh | |
DIRECTORY = "_posts" | |
EXT_ENC = ".aes.b64" | |
EXT_FILE = ".md" | |
ENCRYPTION = "aes-128-cbc" | |
all: usage | |
usage: |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>infocomm</title> | |
<style> | |
* { | |
padding: 0; | |
margin: 0; | |
} |