Skip to content

Instantly share code, notes, and snippets.

Benjamin Guillet benguillet

Block or report user

Report or block benguillet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5000604

Install Python

$ brew install readline sqlite gdbm --universal
$ brew install python --universal --framework
$ python --version
Python 2.7.3

Symlinks...

@benguillet
benguillet / gist:5190447
Last active Dec 15, 2015
A Django gist to send a text file and launch a program on a different server
View gist:5190447
if request.method == 'POST':
if form.is_valid():
# write file in ~/hipercic/apps/dcor/jobs/
with open('apps/dcor/jobs/job_' + datetime.today().strftime("%Y%m%d_%H%M%S") + '_params.txt', 'w') as params_file:
for key, val in form.cleaned_data.iteritems():
params_file.write(str(val) + ' \n')
scp = 'scp /home/guillet/hipercic/' + params_file.name + ' guillet@helios.public.stolaf.edu:dcor/jobs/'
context['scp'] = scp
return_code_scp = subprocess.call(scp, shell=True)
@benguillet
benguillet / mapper.js
Created Jun 26, 2013
Word count in Javascript with WebMapReduce (http://webmapreduce.sourceforge.net/).
View mapper.js
// Javascript Mapper
function mapper(key, value) {
var words = key.split(' ');
for (var i = 0; i < words.length; ++i) {
Wmr.emit(words[i], '1');
}
}
@benguillet
benguillet / .gitconfig
Created Jul 18, 2013
Summary of your commit for Scrum standup.
View .gitconfig
[alias]
; Get a summary of yesterday commits. Useful for Scrum standup.
standup = "!git log --since yesterday --author `git config user.email` --pretty=short"
View .psqlrc
-- Always show how long a query takes
\timing
-- Auto extended display mode
\x auto
-- Prompt db_name@host
\set PROMPT1 '%/@%m %R%# '
@benguillet
benguillet / keybase.md
Last active Aug 29, 2015
Keybase Github Verification
View keybase.md

Keybase proof

I hereby claim:

  • I am benguillet on github.
  • I am benjaminguillet (https://keybase.io/benjaminguillet) on keybase.
  • I have a public key whose fingerprint is 149C 194E F1FF FE6C 36C3 2F39 18C9 EBEB 2B8F 5E1D

To claim this, I am signing this object:

You can’t perform that action at this time.