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 | |
# IMPORTANT! | |
# On Ubuntu, /bin/sh does not point to Bash, but instead to "Dash", a highly | |
# stripped down version that doesn't allow certain more complex behaviours | |
# such as the brace expansion that you will see both in the DEBUG_GREP regex | |
# and in the -exec subroutine in FUSE_FIND. | |
# Allow input from the keyboard. | |
exec < /dev/tty |
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
<?php | |
function get_people() { | |
// Do something... | |
return $all_the_people; | |
} | |
function remove_array_values($arr1, $arr2) { | |
foreach ($arr1 as $key => $item) { | |
if (in_array($item, $arr2)) { |
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
@nums = | |
0: "ноль" | |
1: "один" | |
2: "два" | |
3: "три" | |
4: "четыре" | |
5: "пять" | |
6: "шест" | |
7: "сём" | |
8: "восем" |
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
<html> | |
<head> | |
<script type="text/javascript" src="bower_components/underscore/underscore.js"></script> | |
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script> | |
<script type='text/javascript' src="bower_components/backbone/backbone.js"></script> | |
<script type='text/javascript' src='bower_components/marionette/lib/backbone.marionette.min.js'></script> | |
</head> | |
<body> | |
<div id='wrapper'> |
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
# Encapsulate our stuff within an app variable. | |
app = {} | |
# Define our model- this will mostly just define default values. | |
app.model = Backbone.Model.extend | |
defaults: | |
coords: {} | |
sys: {} | |
weather: {} | |
# etc |
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
body.craycray { | |
animation: spinright 100s infinite linear; | |
} | |
body.craycray > * { | |
animation: spinleft 100s infinite linear; | |
} | |
body.craycray > * > * { | |
animation: spinright 100s infinite linear; | |
} | |
body.craycray > * > * > * { |
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
find ~/Music/ -name "*.mp3" -exec mdls -raw -name kMDItemKeySignature {} \; -exec echo " : {}" \; | grep 'null' |
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
<?php | |
// Thanks to http://jasonrichardsmith.org/blog/drupal-commerce-merge-anonymous-carts-when-logging | |
// for the code on which this is based! | |
function yourmodule_commerce_cart_order_convert($anon_cart, $account) { | |
$user_cart = commerce_cart_order_load($account->uid); | |
if (!$user_cart) { |
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
find sites/all/modules/custom/ -type f -iregex ".*\.\(module\|inc\|php\|install\|info\)" -exec wc -L {} \; | sort -t " " -k1 -g |
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
const five = require('johnny-five'); | |
const board = new five.Board(); | |
const opts = { | |
outputPin: 9, | |
throttleTimeout: 60, | |
}; | |
let timeout = null; |
OlderNewer