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
<?php | |
/** | |
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!) | |
* but the usual tools were hitting the memory limit pretty quick. I found that | |
* manually parsing the XML worked pretty well. Note that this, most likely, | |
* won't work if cells contain anything more than text or a number (so formulas, | |
* graphs, etc ..., I don't know what'd happen). | |
*/ |
# The following code and the code generated art works are the intellectrual properities of Hailei Wang. | |
# © 2010 - 2014, Hailei Wang. All rights reserved. | |
colors = ximport( "colors" ) | |
font( "Courier", 200 ) | |
align( CENTER ) | |
text_path_line_1 = textpath( "IDEO", 0, 200, width = WIDTH) | |
text_path_line_2 = textpath( "LABS", 0, 350, width = WIDTH) |
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' |