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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Untitled</title> | |
</head> | |
<body> | |
</body> | |
</html> |
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
;;; pbcopy.el --- Emacs Interface to pbcopy | |
;; Copyright (C) 2011 Daniel Nelson, based on xclip.el, by Leo Shidai Liu | |
;; This file is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation; either version 3, or (at your option) | |
;; any later version. | |
;; This file is distributed in the hope that it will be useful, |
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 | |
# password and hash pair generation with apg, htpasswd/bcrypt | |
# example usage: | |
# source this file or include the passnhash function in your .bash_profile/.bashrc | |
# then: `passnhash 0 35 14` | |
# prerequisites: | |
# 1) recent version of htpasswd that supports bcrypt (-B flag) | |
# deb: `apt-get install apache2-utils` |
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
# -*- mode: ruby -*- | |
# # vi: set ft=ruby : | |
# At present, you will need to clone the rackspace provider-plugin's source, | |
# build and install it manually (released versions don't properly support | |
# `user_data` and `config_drive`) | |
# git clone https://github.com/mitchellh/vagrant-rackspace.git | |
# cd vagrant-rackspace | |
# bundle && rake build |
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 | |
# WHAT IS THE CORRECT/BEST WAY to transform $* (or the combined | |
# command) so that the non-working examples below will start working? | |
if [ -n "$*" ]; then | |
bash -l -c "su -c 'tmux new-session -s base \"$*\"' - user" | |
# these WORK |
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/bash | |
repo_dir=$1 | |
repo_url=$2 | |
mkdir -p /home/core/repos | |
cd /home/core/repos | |
if [ -d "./$repo_dir" ]; then | |
echo "pulling repo..." |
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
#![feature(unboxed_closures)] | |
fn main() { | |
println!("\n"); | |
println!("adder_1\n-------"); | |
let a1 = adder_1(10000_f64); | |
println!("total: {}", a1); | |
println!(""); |
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
{ entry_cmd="eval $(cat)"; } << 'EOF' | |
tnw () { | |
tmux new-window -n "win$1" -d "$2" | |
} | |
tnw 0 'top -u root' | |
tnw 1 'top -u sailor' | |
tnw 2 |
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
# GNU parallel | |
# better than xargs: http://www.gnu.org/software/parallel/ | |
# install: (wget -O - pi.dk/3 || curl pi.dk/3/) | bash && \ | |
# echo will cite | parallel --bibtex | |
command -v parallel &>/dev/null | |
if [ $? != 0 ]; then | |
alias para='xargs' | |
else | |
alias para='parallel' | |
fi |
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
(ns my.CustomException | |
(:gen-class :extends RuntimeException | |
:implements [clojure.lang.IDeref] | |
:constructors {[java.util.Map String] [String] | |
[java.util.Map String Throwable] [String Throwable]} | |
:init init | |
:state info | |
:methods [[getInfo [] java.util.Map] | |
[addInfo [Object Object] void]])) |
OlderNewer