Skip to content

Instantly share code, notes, and snippets.

@nsfmc
nsfmc / A-Pen-by-Marcos-Ojeda.markdown
Last active August 29, 2015 13:57
A Pen by Marcos Ojeda.
<!-- one image
you could imagine, for example,
icon.svg#tiny referring to an icon for display on 3x3" display
icon.svg#small referring to an icon on a portrait-oriented phone
icon.svg#default referring to an icon that will be large enough to resolve all detail
-->
<picture>
<source media="(max-width: 12em)" src="icon.svg#tiny">
<source media="(max-width: 24em)" src="icon.svg#small">

Keybase proof

I hereby claim:

  • I am nsfmc on github.
  • I am nsfmc (https://keybase.io/nsfmc) on keybase.
  • I have a public key whose fingerprint is 55CF 0365 F98C 2904 200A 7034 22D2 16D1 9B7C 45A7

To claim this, I am signing this object:

alias das="$HOME/projects/gae_env/bin/python -E /usr/local/bin/dev_appserver.py --admin_port=9000 --host=0.0.0.0 --require_indexes --datastore_path=$HOME/projects/.gae/current.sqlite --blobstore_path=$HOME/projects/.gae/blobs/ --skip_sdk_update_check=yes $HOME/projects/gitapp/app.yaml 2>&1 | $HOME/projects/gae_env/bin/technicolor-yawn"
@nsfmc
nsfmc / doop.py
Created January 5, 2014 05:31
the real trick is probably to just fix liten or to write my own dedupe program. this is not bad, though.
#!/usr/bin/env python
"""
doop - a script for moving duplicates from a camera uploads folder from a report
generated by [liten](https://code.google.com/p/liten/)
"DOOP? What's that?" -- philip j. fry
(c) 2014 marcos.a.ojeda <marcos@generic.cx>
MIT licensed (lol)
@nsfmc
nsfmc / upgrade_datastore.zsh
Created September 26, 2013 21:30
saves my old appengine datastore and replaces it with a new one
function upgrade_datastore () {
local ds_source="${HOME}/Dropbox/Khan Academy All Staff/Other shared items/datastores"
local ds_target="${HOME}/projects/.gae"
local backup_name="current.sqlite $(date "+%Y-%m-%d %H.%M.%S")"
mv "${ds_target}/current.sqlite" "${ds_target}/${backup_name}"
cp "${ds_source}/current.sqlite" "${ds_target}/"
echo "Copied new current.sqlite from dropbox"
echo "Your old current.sqlite has been archived at "
echo " ${fg[yellow]}${ds_target}/${backup_name}"
}
@nsfmc
nsfmc / backbone.sublime-snippet
Created April 26, 2013 20:53
an autocomplete snippet which fills out all the backbone boilerplate needed when adding new backbone models to an extant KA project.
<snippet>
<content><![CDATA[
/**
* a backbone model for ${1:Model}
*/
window.${1:Model} = Backbone.Model.extend({
defaults: {
},
@nsfmc
nsfmc / dabblet.css
Created March 4, 2013 22:04
SUBWAY (or the highway)
/**
* SUBWAY (or the highway)
*/
body{
font-family: museosans-300, sans-serif;
font-size: 14px;
color: #999;
}
.tutorial {
@nsfmc
nsfmc / dabblet.css
Created March 1, 2013 21:37
SUBWAY (or the highway)
/**
* SUBWAY (or the highway)
*/
body{
font-family: museosans-300, sans-serif;
font-size: 14px;
color: #999;
}
.tutorial {
@nsfmc
nsfmc / blame.py
Created November 26, 2012 04:37
Blame current line in textmate (html mode dialog)
#!/usr/bin/env python
#
# beforeRunningCommand: nop
# input: selection
# inputFormat: text
# name: Blame current line
# outputCaret: afterOutput
# outputFormat: html
# outputLocation: toolTip
# scope: attr.scm.hg