start new:
tmux
start new with session name:
tmux new -s myname
/** | |
* This is a basic interpreter of the language Swap. | |
* Link: http://esolangs.org/wiki/Swap | |
* Author: revcompgeek | |
*/ | |
module swap; | |
import tango.io.Console; | |
import tango.io.Stdout; |
;; Linked list implementation | |
;; I compile it like this on Mac OS X: | |
; | |
; llvm-as linked-list.ll | |
; llc linked-list.bc | |
; as linked-list.s -o linked-list.o | |
; ld /usr/lib/crt1.o linked-list.o -o linked-list -lSystem -macosx_version_min 10.6 | |
;; Type aliases | |
%free_func = type void (i8*)* |
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
// You can test this online at: https://play.golang.org/p/hhayRT1VWgj | |
package main | |
import ( | |
"crypto/sha1" | |
"encoding/hex" | |
"fmt" | |
"io" | |
"strings" | |
) |
let eval str = | |
let cells = Array.make 4096 0 in | |
let ptr = ref 0 in | |
let len = String.length str in | |
let rec evalbf c = | |
if c >= len then | |
c | |
else | |
match String.get str c with |
package com.comphenix.example; | |
import java.io.BufferedInputStream; | |
import java.io.DataInput; | |
import java.io.DataInputStream; | |
import java.io.DataOutput; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; |
#!/bin/bash | |
echo -e "\n\n----------------------starting to install gcc compiler for objective C----------------------"; | |
echo -e "\n----------------------running: <sudo apt-get install gnustep gnustep-devel>----------------------" | |
sudo apt-get install gnustep gnustep-devel | |
echo -e "\n----------------------gnustep installed----------------------" | |
echo -e "\n----------------------running: <sudo apt-get install gobjc>----------------------" | |
sudo apt-get install gobjc | |
echo -e "\n----------------------gobjc installed----------------------" | |
sudo apt-get install tree | |
echo -e "\n------------------------Making Project structure-------------" |
package de.zh32.slp; | |
import com.google.gson.Gson; | |
import java.io.ByteArrayOutputStream; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; |