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
Using git+dropbox together effectively? - Stack Overflow | |
I think that git on dropbox is great. I use it all of the time. I have multiple computers (two at home and one at work) that I use dropbox as a central bare repo. Since I don’t want to host it on a public service and I don’t have access to a server that I can always ssh to, Dropbox takes care of this by syncing (very quickly) in the background. | |
Setup is something like this: | |
~/project $ git init | |
~/project $ git add . | |
~/project $ git commit -m "first commit" | |
~/project $ cd ~/Dropbox/git |
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><head><title></title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> | |
<script type="text/javascript" src="../protovis-3.2/protovis-r3.2.js"></script> | |
<script type="text/javascript"> | |
//getNet is where we get a list of Twitter usernames | |
function getNet(){ | |
url="http://search.twitter.com/search.json?q=jisc11&rpp=100&callback=?" |
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
/** | |
* Rename some variables and update the database tables | |
*/ | |
function apachesolr_update_7012() { | |
module_load_include('inc', 'apachesolr', 'apachesolr.index'); | |
$env_id = apachesolr_default_environment(); | |
// Variable changed from integer to array with environment integers | |
$stored = variable_get('apachesolr_index_last', array()); | |
if (isset($stored['apachesolr'])) { |
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
Unable to import sentry.filters.SiteFilter | |
Traceback (most recent call last): | |
File "/srv/www/sentry/lib/python2.6/site-packages/sentry-5.0.21-py2.6.egg/sentry/filters/helpers.py", line 35, in get_filters | |
cls = getattr(module, class_name) | |
AttributeError: 'module' object has no attribute 'SiteFilter' | |
Unable to import sentry.filters.ServerNameFilter | |
Traceback (most recent call last): | |
File "/srv/www/sentry/lib/python2.6/site-packages/sentry-5.0.21-py2.6.egg/sentry/filters/helpers.py", line 35, in get_filters | |
cls = getattr(module, class_name) | |
AttributeError: 'module' object has no attribute 'ServerNameFilter' |
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
<style type="text/css"> | |
HTML.safari.win { | |
-webkit-text-stroke: 1px transparent; | |
} | |
HTML.chrome.win { | |
-webkit-text-stroke: 0.4px; | |
} | |
</style> | |
<script type="text/javascript" charset="utf-8"> | |
function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod' |
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 print $footer_js; ?> |
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 | |
$final = array(); | |
$left = array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); | |
$right = array('a','b','c','d','e'); | |
shuffle($right); | |
$merged = array_merge($left, $right); | |
shuffle($merged); | |
$r = 0; |
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
/** | |
* Excludes node type "foo" from search results | |
* | |
* @param object $query | |
*/ | |
function mymodule_query_alter(&$query) { | |
$is_search = FALSE; | |
foreach ($query->getTables() as $table) { | |
if ($table['table'] == 'search_index') { | |
$is_search = TRUE; |
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
import requests | |
def campfire(token, subdomain, room_id, message, msgtype): | |
requests.post( | |
'https://%s.campfirenow.com/room/%s/speak.json' % ( | |
subdomain, room_id | |
), | |
auth=(token, 'x'), | |
headers={ | |
'Content-type': 'application/json' |
OlderNewer