Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am juanvallejo on github.
  • I am juanvallejo (https://keybase.io/juanvallejo) on keybase.
  • I have a public key whose fingerprint is 9098 4926 82F5 96E0 843C C8D9 F04C 541A 21C8 0C8A

To claim this, I am signing this object:

@juanvallejo
juanvallejo / idea_script.js
Last active August 29, 2015 13:58
IDEA Script: Automatically "rates" a professor's idea survey in the most humanly-seeming way.
//paste this into chrome console
var win = window.frames[1];
var doc = win ? win.document.documentElement : document;
var inputs = doc.getElementsByTagName("input");
if(win && inputs && inputs.length) {
console.log("Loading, please wait...");
console.log("Realizing realizations...");
console.log("Loading loading sign...");
var inp;
for(var i=0;i<inputs.length;i++) {
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases
@juanvallejo
juanvallejo / main.js
Created October 8, 2014 19:32
Basic JavaScript application components
/**
* Provided without license, as is.
*
* @program main.js
*
* @author juanvallejo
* @date 10/7/14
*
* initialize and execute main program
*
@juanvallejo
juanvallejo / irssi_config
Last active August 29, 2015 14:08
irssi_config
servers = (
{ address = "eu.irc6.net"; chatnet = "IRCnet"; port = "6667"; },
{ address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; },
{ address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; },
{
address = "irc.undernet.org";
chatnet = "Undernet";
port = "6667";
},
{ address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
@juanvallejo
juanvallejo / .vimrc
Created December 26, 2014 06:42
vimrc
colorscheme kolor
syntax on
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
@juanvallejo
juanvallejo / .tmux.conf
Created January 7, 2015 20:54
.tmux.conf
#add vim colors
set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g default-terminal "screen-256color"
#remap prefix to Control + a and remap key bindings
set -g prefix C-a
unbind C-b
bind C-a send-prefix
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
@juanvallejo
juanvallejo / simple-server.js
Last active August 29, 2015 14:14
Simple Node.js Server
// define runtime constants
var PORT = 8000;
// import modules needed to make the server (http and filesystem modules for now)
var http = require('http');
var fs = require('fs');
var server = http.createServer(requestHandler);
function requestHandler(request, response) {
@juanvallejo
juanvallejo / server.js
Last active August 29, 2015 14:14
Semi-complex server. Handles routing and multiple file mime types.
#!/bin/env node
/**
* Provided under the MIT License (c) 2014
* See LICENSE @file for details.
*
* @file server.js
*
* @author juanvallejo
* @date 1/22/15
var http = require('http');
// our main function. Runs on program start
(function main(argv) {
var netRequest = http.request({
method:'POST',
host:'127.0.0.1',
port:'8080'
}, function(response) {