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
var HelloView = Backbone.View.extend({ | |
initialize: function() { | |
this.listenTo(this.model, "change", this.render, this); | |
this.render(); | |
}, | |
render: function() { | |
var reactEl = React.createElement('div', {}, 'Hello, World!'); | |
ReactDOM.render(reactEl, this.el); | |
return this; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<title>Hello</title> | |
<!--<link href="style.css" rel="stylesheet">--> | |
<style> |
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
# Send a SIGHUP to only the children (--ppid is the magic param here). | |
cat /var/run/celery.pid | xargs ps --no-headers --ppid | awk '{print $1}' | xargs kill -HUP |
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 | |
### BEGIN INIT INFO | |
# Provides: johnd | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. | |
### END INIT INFO |
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/sh | |
watchmedo shell-command \ | |
--pattern="*prof" \ | |
--ignore-pattern="*png" \ | |
--wait \ | |
--command='find profile_data -name "*\.prof" -exec sh -c "test -f {}.png || (gprof2dot -f pstats {} | dot -Tpng -o {}.png && open {}.png)" \;' \ | |
profile_data |
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 | |
BITRATE=320 | |
defvalue='.' | |
SOURCE_DIR=${1:-$defvalue} | |
# Validate arguments | |
if [[ "$#" == 0 ]]; then | |
echo >&2 "Usage: ./convert.sh ./exports/*.wav" | |
exit 1; |
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
sudo killall VDCAssistant |
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
/** | |
* jQuery plugin to add a faux browser around some images | |
* Based off of http://cloudcannon.com/deconstructions/2014/11/21/flat-css-browser-wrapper.html | |
* | |
* Example usage: | |
* | |
* <body> | |
* <img class="fakeBrowser" src="http://example.com/image.jpg" | |
* </body> | |
* |
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
### Keybase proof | |
I hereby claim: | |
* I am rchrd2 on github. | |
* I am rchrd2 (https://keybase.io/rchrd2) on keybase. | |
* I have a public key whose fingerprint is A166 5BE1 E8F6 A2A3 BEC7 382A 8CCA 345A 01E9 EF4B | |
To claim this, I am signing this object: |
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
# Add this to your ~/.bash_profile | |
# Disable pyc | |
export PYTHONDONTWRITEBYTECODE=x |