Skip to content

Instantly share code, notes, and snippets.

Sarah Mount snim2

Block or report user

Report or block snim2

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 compact.css
#post-list .post .post__img {
position: absolute;
margin-left: -200px !important;
display: block;
}
.post .post__img img, img.markdown-inline-img {
height: 20px !important;
width: auto !important;
View did-you-know-re.py
from sre_parse import Pattern, SubPattern, parse as sre_parse
from sre_compile import compile as sre_compile
from sre_constants import BRANCH, SUBPATTERN
class Scanner(object):
def __init__(self, tokens, flags=0):
subpatterns = []
pat = Pattern()
View shim.rb
# This file modifies benchmark-ips to better accommodate the optimisation
# characteristics of sophisticated implementations of Ruby that have a very
# large difference between cold and warmed up performance, and that apply
# optimisations such as value profiling or other speculation on runtime values.
# Recommended to be used with a large (60s) warmup and (30s) measure time. This
# has been modified to be the default. Note that on top of that, it now runs
# warmup five times, so generating the report will be a lot slower than
# before.
# Code is modified from benchmark-ips
@smarr
smarr / truffle-material.md
Last active Jun 2, 2019
Truffle: Languages and Material
View truffle-material.md
@jamesarosen
jamesarosen / two-travis-builds.md
Last active Apr 22, 2019
Running Two Very Different Travis Builds
View two-travis-builds.md

I have a project that's been happily chugging along on Travis for a while. Its .travis.yml looks something like

script:
  - node_modules/ember-cli/bin/ember test

I wanted to add a second parallel build that did something very different. I didn't want to run ember test with a different Ember version or some other flag. I wanted to run a completely different command. Specifically, I wanted to run LicenseFinder's audit.

Travis has great docs on customizing parallel builds, but nothing describes how to do two completely different commands.

View gist:99b10089cb53a038c942
# This will give all the ICSE2015/2016 papers filenames extracted from the titles of the PDF metadata,
# and put them in a folder on your desktop. It's been tested on OSX and depends on wget and pdfinfo,
# available via the macports xpdf package on pre-Yosemite OSX, and here for Yosemite users:
#
# ftp://ftp.foolabs.com/pub/xpdf/xpdfbin-mac-3.04.tar.gz
#
# It's a manual install, unfortunately, but I trust you're geared up for that.
#
# The username and password are available from these public-facing pdfs:
# http://atlantis.isti.cnr.it/ICSE2015ProgramBrochureOnLineVersion.pdf (2015 - icse15/conf15)
@drjwbaker
drjwbaker / 2015-03_SSI.md
Last active Aug 29, 2015
Software Sustainability Collaborations Workshop, Oxford, 25-27 March 2015
View 2015-03_SSI.md

#Software Sustainability Collaborations Workshop, Oxford, 25-27 March 2015

Live notes, so an incomplete, partial record of what actually happened.

http://www.software.ac.uk/cw15


Tags: collabw15

My asides in []

@Zulko
Zulko / zombie_france.py
Last active Oct 12, 2018
Zombie pandemic simulation in France
View zombie_france.py
"""
Model of a Zombie outbreak in France, starting in Grenoble
This is a rewrite from this blog post by Max Berrgren:
http://maxberggren.github.io/2014/11/27/model-of-a-zombie-outbreak/
with a different country, a slightly different model, and different
libraries. The map of population density is taken from Wikimedia Commons
View top_200_ish_commands.csv
command count num_people_using
cd 347893.0 803.0
ls 326227.0 783.0
rm 80394.0 744.0
git 426701.0 696.0
sudo 109042.0 690.0
mkdir 22987.0 655.0
cat 54491.0 642.0
mv 39297.0 640.0
ssh 83035.0 623.0
You can’t perform that action at this time.