#Mac OS X
This file contains hidden or 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 | |
// in BaseSimpleModel.php | |
class BaseSimpleModel extends RedBean_SimpleModel { | |
/** | |
* Get or create a model with the bean set | |
* @static | |
* @param string $table |
This file contains hidden or 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 xmlns:o="urn:schemas-microsoft-com:office:office" | |
xmlns:x="urn:schemas-microsoft-com:office:excel" | |
xmlns="http://www.w3.org/TR/REC-html40"> | |
<head> | |
<meta http-equiv="expires" content="Mon, 06 Jan 1999 00:00:01 GMT"> | |
<meta http-equiv=Content-Type content="text/html; charset=UTF-8"> | |
<!--[if gte mso 9]><xml> | |
<x:ExcelWorkbook> | |
<x:ExcelWorksheets> | |
<x:ExcelWorksheet> |
This file contains hidden or 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 | |
echo "What should the Application be called (no spaces allowed e.g. GCal)?" | |
read inputline | |
name=$inputline | |
echo "What is the url (e.g. https://www.google.com/calendar/render)?" | |
read inputline | |
url=$inputline |
This file contains hidden or 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
(function($){ | |
$.fn.redraw = function(){ | |
return $(this).each(function(){ | |
var n = document.createTextNode(' '); | |
$(this).append(n); | |
setTimeout(function(){n.parentNode.removeChild(n)}, 0); | |
}); | |
} | |
})(jQuery) |
This file contains hidden or 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
$default_rounded_amount: 5px | |
// Round corner at position by amount. | |
@mixin round-corner($position, $amount: $default_rounded_amount) | |
border-#{$position}-radius: $amount | |
-webkit-border-#{$position}-radius: $amount | |
@mixin round-corner-mozilla($position, $amount: $default_rounded_amount) | |
-moz-border-radius-#{$position}: $amount | |
// Round left corners by amount |
This file contains hidden or 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
""" | |
Generator-style DataSource that loads from CSV. | |
""" | |
import pytz | |
import csv | |
import mmap | |
import os.path | |
This file contains hidden or 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
# From http://stackoverflow.com/a/14674326/1524448 | |
import collections | |
freq = collections.Counter() | |
# sample and output | |
# line = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod' | |
# Counter({'ipsum': 1, 'amet,': 1, 'do': 1, 'sit': 1, 'eiusmod': 1, 'consectetur': 1, 'sed': 1, 'elit,': 1, 'dolor': 1, 'Lorem': 1, 'adipisicing': 1}) | |
with open(filename) as f: |
This file contains hidden or 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
# For http://giantcomet.com/hues/ | |
# inspired by https://twitter.com/JP_Sirois/status/132517964267261952 | |
# with help from UIElementInspector | |
# Works as a workflow in AlfredApp | |
tell application "Hues" to activate | |
tell application "System Events" | |
tell process "Hues" | |
click first button of window 1 | |
end tell |
#Mac OS X
OlderNewer