Skip to content

Instantly share code, notes, and snippets.

ben@ben-desktop:~$ dpkg --list | grep boost
ii libboost-all-dev 1.49.0.1 amd64 Boost C++ Libraries development files (ALL) (default version)
ii libboost-chrono-dev 1.49.0.1 amd64 C++ representation of time duration, time point, and clocks (default version)
ii libboost-chrono1.49-dev 1.49.0-3.1ubuntu1.1 amd64 C++ representation of time duration, time point, and clocks
ii libboost-chrono1.49.0 1.49.0-3.1ubuntu1.1 amd64 C++ representation of time duration, time point, and clocks
ii libboost-date-time-dev 1.49.0.1 amd64 set of date-time libraries based on generic programming concepts (default version)
rc libboost-date-time1.42.
DEBUG:root:UNKNOWN PTP Property d105 changed
DEBUG:root:UNKNOWN PTP Property d108 changed
DEBUG:root:UNKNOWN PTP Property d106 changed
DEBUG:root:UNKNOWN PTP Property d107 changed
DEBUG:root:UNKNOWN PTP Property d109 changed
@benhowes
benhowes / gist:8801605
Last active August 29, 2015 13:56
gulp upload to s3
/*
* Uses https://github.com/nkostelnik/gulp-s3 with
* Gulpjs: http://gulpjs.com/
*/
var s3_creds = {
"key": "AKIAI3Z7CUAFHG53DMJA",
"secret": "acYxWRu5RRa6CwzQuhdXEfTpbQA+1XQJ7Z1bGTCx",
"bucket": "dev.example.com",
"region": "eu-west-1"
### Keybase proof
I hereby claim:
* I am benhowes on github.
* I am benhowes (https://keybase.io/benhowes) on keybase.
* I have a public key whose fingerprint is 0B37 080D A5E5 C96B F02D C14C E29D 82DA D3AE C5F4
To claim this, I am signing this object:
/* Sample of the events which will be used to replay */
[
{
"collection": "viewChange",
"delta": 0,
"frame": 31,
"timestamp": 1398613195820
},
.....
{
@benhowes
benhowes / dictionary.js
Last active August 29, 2015 14:01
Files for Zoetrope i18n blog post
var langStrings={
"en": {
"callToAction": {
"desktop": "click and drag image to rotate in 3D",
"mobile": "swipe image to rotate in 3D"
},
"inlineCallToAction": {
"desktop": "click to rotate",
"mobile": "tap to rotate"
},
@benhowes
benhowes / linnlive.csv
Created August 20, 2014 14:36
Linnlive exports
SKU PropertyType PropertyName PropertyValue
24994 Attribute zoetrope_uuid 5346656cc24f2850912ad981
24994 Attribute zoetrope_start_position 0
24994 Attribute IMAGE1 http://d34tuy4jppw3dn.cloudfront.net/5346656cc24f2850912ad981/1000/0.jpg
23175 Attribute zoetrope_uuid 53455f67c24f282735cb9806
23175 Attribute zoetrope_start_position 0
23175 Attribute IMAGE1 http://d34tuy4jppw3dn.cloudfront.net/53455f67c24f282735cb9806/1000/0.jpg
24352 Attribute zoetrope_uuid 53456b22c24f282735cb980b
24352 Attribute zoetrope_start_position 0
24352 Attribute IMAGE1 http://d34tuy4jppw3dn.cloudfront.net/53456b22c24f282735cb980b/1000/0.jpg
@benhowes
benhowes / basicPosting.php
Last active August 29, 2015 14:09
Zapier Webhook posting
<?php
$params = array(
'name' => 'Erlich Bachman',
'email' => '[email protected]',
});
//send Zapier webhook
$response = drupal_http_request('https://zapier.com/hooks/catch/.../', array(
'headers' => array('Content-Type' => 'application/json', 'Accept' => 'application/json'),
@benhowes
benhowes / gist:f0efa87467fe45d62044
Created May 24, 2015 15:19
How Many 5-permutations that contain at least one number are there for the following set {a,b,c,d,e,f,g,1,2,3,4,5}
from itertools import permutations
s = ['a','b','c','d','e','f','g',1,2,3,4,5]
perms = permutations(s,5)
# The following line does this:
# For each 5-permutation, see if there is an instance of an integer in it (isinstance).
# If there is, add one to a temporary list which we then sum to give the total count.
count = sum([1 for p in perms if sum([isinstance(_, int) for _ in p])])
print count
<predefinedLocation id="Link114001101">
<predefinedLocationName><value lang="en">A50 westbound exit for A515 near Sudbury (west)</value></predefinedLocationName>
<predefinedLocation xsi:type="Linear">
<tpeglinearLocation>
<tpegDirection>westBound</tpegDirection>
<tpegLocationType>segment</tpegLocationType>
<to xsi:type="TPEGJunction">
<pointCoordinates>
<latitude>52.892544</latitude>
<longitude>-1.775278</longitude>