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
λ erl -pa ebin deps/*/ebin | |
{error_logger,{{2014,9,4},{14,53,53}},"~s~n",["Error in process <0.23.0> with exit value: {undef,[{group,start,[<0.23.0>,{}],[]},{user_drv,start_user,0,[{file,\"user_drv.erl\"},{line,154}]},{user_drv,server1,3,[{file,\"user_drv.erl\"},{line,114}]}]}\n"]} | |
{error_logger,{{2014,9,4},{14,54,3}},crash_report,[[{initial_call,{supervisor_bridge,user_sup,['Argument__1']}},{pid,<0.22.0>},{registered_name,[]},{error_info,{exit,nouser,[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,322}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}},{ancestors,[kernel_sup,<0.10.0>]},{messages,[]},{links,[<0.11.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,27},{reductions,346}],[]]} | |
{error_logger,{{2014,9,4},{14,54,3}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,nouser},{offender,[{pid,undefined},{name,user},{mfargs,{user_sup,start,[]}},{restart_type,temporary},{shutdown,2000},{child_type,supervisor}]}]} | |
{ |
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
(function($) { | |
var elCount = {}; | |
var finishedCount = {}; | |
$.fn.graphite = function(options) { | |
for(var i=0; i < $(this).length; i++){ | |
$this = $(this[i]); | |
elCount[$this.attr('id')] = 0; | |
finishedCount[$this.attr('id')] = 0; | |
params = $.fn.graphite.initParams($this, options); |
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
import System.Random | |
randomCells :: Int -> StdGen -> [Int] | |
randomCells size gen = take size $ randomRs (0, 1) gen | |
createGeneration :: [Int] -> Int -> [[Int]] -> [[Int]] | |
createGeneration [] _ generation = generation -- use _ when you don't use a variable | |
createGeneration cells width generation = | |
let line = take width cells | |
in createGeneration (drop width cells) width (line:generation) |
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
import System.Random | |
import Data.List.Split | |
randomCells :: Int -> StdGen -> [Int] | |
randomCells size gen = take size $ randomRs (0, 1) gen | |
createGeneration :: [Int] -> Int -> [[Int]] | |
createGeneration cells width = splitEvery width cells | |
main :: IO() -- declare type signature |
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
(require 'cl) | |
(defun is-magit-buffer (buffer) | |
(let ((name (buffer-name buffer))) | |
(and (= ?* (aref name 0)) | |
(not (string-match "^\\*magit\\*" name))))) | |
(defun kill-magit-buffers () | |
(interactive) | |
(loop for buffer being the buffers |
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
# See following for more information: http://www.infinitered.com/blog/?p=19 | |
# Path ------------------------------------------------------------ | |
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:$PATH # OS-X Specific, with MacPorts and MySQL installed | |
#export PATH=/opt/local/bin:/opt/local/sbin:$PATH # OS-X Specific, with MacPorts installed | |
if [ -d ~/bin ]; then | |
export PATH=:~/bin:$PATH # add your bin folder to the path, if you have it. It's a good place to add all your scripts | |
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
#!/bin/bash | |
set -e | |
BUILD_URL='http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/' | |
update_google_chrome() { | |
get_latest_revision_number | |
download_latest_revision | |
extract_code |
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 | |
#fx-useradd uid "first name" "last name" | |
PATH='/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin' | |
SKEL_PATH="/homes/skeleton" | |
usage() { | |
cat <<EOT | |
Usage: ${CMD} login first_name last_name |
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
./smbldap-groupshow.pl group_name | grep memberUid | cut -d" " -f2 | sed 's/user_to_keep_in\|user2_to_keep_in//g' | tr -s "," | xargs -i ./smbldap-groupmod.pl -x {} group_name |
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/env ruby | |
# Ruby script to generate SSHA (Good for LDAP) | |
require 'sha1' | |
require 'base64' | |
hash = "{SSHA}"+Base64.encode64(Digest::SHA1.digest(ARGV[0]+'salt')+'salt').chomp! | |
puts 'userPassword: '+hash+"\n" |
OlderNewer