The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
I hereby claim:
To claim this, I am signing this object:
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' |
/** | |
* 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; |
<?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; |
<?php print $footer_js; ?> |
<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' |
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' |
/** | |
* 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'])) { |