Skip to content

Instantly share code, notes, and snippets.

1: idle
runtime sys_darwin.go:507 pthread_cond_wait(*pthreadcond(0x10079bb48), *pthreadmutex(0x10079bb08))
runtime os_darwin.go:66 semasleep(-1)
runtime lock_sema.go:181 notesleep(*note(0x10079b908))
runtime proc.go:1632 mPark(...)
runtime proc.go:2536 stopm()
runtime proc.go:3229 findRunnable()
runtime proc.go:3582 schedule()
runtime proc.go:3921 goexit0(*g(0x1400068c680))
@jarv
jarv / generate-wc
Created November 5, 2015 22:47
Generate wordcloud of TPP
from os import path
from scipy.misc import imread
import matplotlib.pyplot as plt
import random
import os
from wordcloud import WordCloud, STOPWORDS
text = ""
for f in os.listdir("."):
@jarv
jarv / fa-ublock-adblock-workaround
Created January 16, 2015 18:42
fontawesome ublock adblock workaround
.my-fa-facebook:before {
content: "\f09a";
}
.my-fa-facebook-square:before {
content: "\f082";
}
.my-fa-flickr:before {
content: "\f16e";
}
.my-fa-google-plus-square:before {
@jarv
jarv / gist:4ed9e6faa374a99acbc8
Created September 12, 2014 16:28
edx xqueue
The XQueue software is one of our earliest components and not very
well documented unfortunately.
What it is from a high level is a Django app that monitors a rabbitMQ
cluster that takes student submissions and makes it available to an
external grader.
Here is example code that watches the xqueue for new submissions and
grades them using our python grader -
https://github.com/edx/xqueue-watcher
Here is documentation that describes how to interface with xqueue -
instance_tags:
environment: sandbox
github_username: jarv
Name: jarv-sandbox
...
- name: Launch ec2 instance
local_action:
- name: checkout code
git: dest={{ dir }} repo={{ repo }}
environment:
GIT_SSH: /tmp/git_ssh.sh
/tmp/git_ssh.sh
#!/bin/sh
exec /usr/bin/ssh -o StrictHostKeyChecking=no -i {{ git_identity }} "$@"
@jarv
jarv / gist:7775280
Last active December 30, 2015 04:19
- name: check out code
git: dest=path/to/dest repo=some_repo version=master
environment:
GIT_SSH: /tmp/git_ssh.sh
git_ssh.sh:
#!/bin/sh
exec /usr/bin/ssh -o StrictHostKeyChecking=no -i /path/to/git-identity "$@"
@jarv
jarv / gist:7484570
Created November 15, 2013 13:49
devstack dosa release
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'edx-devstack'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
Pruning invalid NFS exports. Administrator privileges will be required...
host <internal address>
ProxyCommand ssh -W %h:%p <jumpbox address>
ForwardAgent yes
IdentityFile <path/to/key>
User <username>'
define user_manage(
$ensure = 'present'
) {
if $ensure == 'absent' {
User[$name] -> Group[$name]
}
user { $name:
ensure => $ensure,