Skip to content

Instantly share code, notes, and snippets.

begriffs

Making 20% Time Work

January 29, 2016 20% time image from lifehacker.com

Following Google’s lead many companies have instituted “20% time” for their employees. This is one day per week in which employees can work on projects of their own choosing. The practice keeps developers motivated and sharp, produces tools to solve company problems, and in the best case creates open source which builds prestige and helps recruitment.

But there’s one problem with twenty-percent time: it takes discipline to pull it off. Without clear direction the open-source day can devolve into an unstructured quagmire, wasting money and demotivating all involved.

These are the parameters we use. The MyTestAvlModule class loads the feed AVL in Transitime. (AVL with AssignmentType ROUTE_ID).
transitime.core.agencyId=TS
transitime.logging.dir=/home/test/transitime
transitime.core.pidDirectory=/home/test/transitime/pids/
transitime.rmi.rmiHost=localhost
transitime.rmi.rmiPort=2099
transitime.rmi.secondaryRmiPort=2098
transitime.avl.minLatitude=-33.70
$(".j-selectbox").val("NO_RECEIVE");$(".icon-checkbox[aria-checked='true']").click();
@luqmaan
luqmaan / psql_copy.bash
Last active October 14, 2015 17:01
psql copy command to csv command bash
psql -c "\copy (SELECT * FROM *) TO '/tmp/lol.csv' WITH CSV;"
<a href='{{case.direct_url}}'>{{case.subject}}</a>
<br />
Case {{case.id}} ({{case.status.name}}, Priority {{case.priority}}) updated{% if case.active_user %} by {{case.active_user.name}}{% endif %}.
{% if case.customer.name %}Customer <i>{{case.customer.name}}.</i> {% endif %}
{% if case.customer.company %}Company <i>{{case.customer.company}}.</i> {% endif %}
<br />
{% if case.user.name != '' or case.labels != '' or case.description != '' %}
{% if case.user.name %}Assigned to <i>{{case.user.name}}.</i> {% endif %}
{% if case.labels and case.labels != '' %}Labels <i>{{case.labels}}.</i> {% endif %}
{% if case.description and case.description != '' %}Description <i>{{case.description}}.</i> {% endif %}
@luqmaan
luqmaan / log all jasmine.ajax requests.js
Last active June 26, 2016 19:52
A copypesto to console.log all jasmine ajax requests. Makes it easier to debug why a request might have been missed. Karma
for (var i = 0; i < jasmine.Ajax.requests.count(); i++) {
var req = jasmine.Ajax.requests.at(i);
console.log(
req.method.toUpperCase(),
req.url,
req.status,
req.responseText ? req.responseText.length : null
)
}
data
.env
@luqmaan
luqmaan / newmac.sh
Last active October 19, 2015 01:20
change your wifi mac address to something random on os x yosemite
newmac() {
m0=$(ifconfig en0 | grep ether | sed 's/\s*ether //g' | sed 's/ $//g' | sed 's/ /:/g')
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
m1=$(od -An -N6 -t xC /dev/urandom | sed -e 's/^\s*//g' | sed -e 's/\s*$//g' | sed -e 's/ /:/g')
echo "changing mac from $m0 to $m1"
sudo ifconfig en0 ether $m1
sudo networksetup -detectnewhardware
echo "clearing safari"
clearsafari
}

Why the hell is Etymotic selling the ER-4S version when the ER-4PT is the one that doesn't have the 75Ω resistor embedded in the barrel. At least then you'd be able to use it with your smartphone. It's not like it makes any difference in cost and is probably actually cheaper for Etymotic but I expect they are probably Scrooge McDuck'n or hopefully it was just a mistake and they meant the ER-4PT. I would hope that it is the latter.

After all these are the people that will sell a cable adapter with a 75Ω resistor in series for $55 to convert your PT to S. Rip off is an understatement and others sell these adapters on ebay for $15.

The green filters from Etymotic are also really expensive considering how cheap you can get them on mouser. Considering that in the lifespan of an IEM you'll be buying replacement tips you'll certainly be charged quite a lot for them by Etymotic. Etymotic are certainly happy to take you for a ride for their overpriced accessories.

The cable it comes with is also awful and hasn't be

@luqmaan
luqmaan / ksdiff.py
Last active August 29, 2015 14:25
Call kaleidoscope from python. Useful for diffing/comparing two dictionaries. I do this sometimes in nosetests.
def ksdiff(a, b):
import subprocess
import os
if not os.path.exists('/usr/local/bin/ksdiff'):
raise Exception('where is ur ksdiff m8')
else:
a_path = '/tmp/ksdiff_a.txt'
b_path = '/tmp/ksdiff_b.txt'
with open(a_path, 'w') as fh:
fh.write(str(a))