I was trying to draw a pipe in webgl and this what I came up with. It can be viewed here
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 parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function git_prompt { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" |
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
sudo -s | |
yum update | |
groupadd rvm | |
gpasswd -a ec2-user rvm | |
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel |
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/bash | |
export AWS_CLOUDWATCH_HOME=/opt/aws/apitools/mon # cloudwatch command line tools | |
export AWS_CLOUDWATCH_URL=https://monitoring.amazonaws.com # cloudwatch end point | |
export PATH=$AWS_CLOUDWATCH_HOME/bin:$PATH | |
export JAVA_HOME=/usr/lib/jvm/jre | |
# cloudwatch credential | |
CLOUDWATCHCREDENTIAL=/root/aws-custom-monitor/cloudwatch_credential.txt |
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
startup_message off | |
defscrollback 10000 | |
vbell off | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]' |
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/bash | |
# | |
# This script parses filenames of the following format "s1_c-sq-0x_1_1369921304_1.PNG" and add | |
# certain info to the image | |
# | |
FILES=*.PNG | |
for file in $FILES; do | |
while IFS='_' read -ra filename; do |
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
var net = require( 'net' ); | |
var serverAddress = 'localhost', | |
serverPort = 5001; | |
var server = net.createServer( function( socket ) { | |
console.log( 'New socket connection.\n' ); | |
// send welcome message | |
socket.write( "Connected to Server.\n" ); |
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
// create the worker object | |
var worker = new Worker( "worker.js" ); | |
// add message event listener | |
worker.addEventListener( 'message', function( event ) { | |
switch ( event.data.type ) { | |
case "debug": | |
console.log( event.data.message ); | |
break; | |
case "result": |
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
1 20.465 -16.439 -4.668 65.601 -6.760 -144.382 1853586 0x75d90b 0 | |
2 21.251 -26.413 -5.341 172.982 25.081 -151.184 1853586 0x75d90b 0 |
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
def permutation(prefix, str) | |
n = str.length | |
if n == 0 | |
p prefix | |
else | |
for i in 0..n-1 do | |
if i == 0 | |
perm("#{prefix}#{str[i]}", str[i+1..n-1]) | |
else | |
perm("#{prefix}#{str[i]}", "#{str[0..i-1]}#{str[i+1..n-1]}") |
OlderNewer