Skip to content

Instantly share code, notes, and snippets.

var co = require('co'),
Promise = require('bluebird')
;
// This just creates 3 identical generator functions.
(function (g) {
["foo","bar","baz"].forEach( function(x) {
g[x] = function * () {
let c = 0;
@EvanCarroll
EvanCarroll / gist:8554456
Last active May 6, 2019 15:46
Perl sux.
#!/usr/bin/env perl
use Benchmark qw(:all);
use strict;
use warnings;
use constant STUFF => ( qw/
TRO BAR OLOL JAZ
TRO BAR OLOL JAZ
/ );
@EvanCarroll
EvanCarroll / gist:8531891
Last active January 3, 2016 22:59
Thunk fun.
var thunkify = require('./index.js');
function wtf ( cb ) {
console.log('start');
// Function, expecting callback triggers twice
cb( 'HELLO 1' );
cb( 'HELLO 2' );
cb( 'HELLO 3' );
console.log('done');
return;
@EvanCarroll
EvanCarroll / gist:2656537
Created May 10, 2012 23:25
Postgresql bug.
CREATE TYPE citext;
--
-- Name: citextin(cstring); Type: FUNCTION; Schema: public; Owner: ecarroll
--
CREATE FUNCTION citextin(cstring) RETURNS citext
LANGUAGE internal IMMUTABLE STRICT
AS $$textin$$;
SELECT DISTINCT ON(random.first, random.last) coalesce(mf.name, ff.name), l.name FROM (
SELECT
RANDOM() * 90.020 AS first -- dataset is 90% of most popular
, RANDOM() * 90.483 AS last
, CASE WHEN RANDOM() > 0.5 THEN 'male' ELSE 'female' END AS sex
, CASE WHEN RANDOM() > 0.5 THEN 'model' ELSE 'vehicle' END AS detail
FROM generate_series(1,10,1)
) AS random
LEFT OUTER JOIN census.names AS mf
ON random.sex = 'male'
There are a few possibilities concerning what Evan might be and what his agenda is:
(i) Evan is perhaps just a guy who likes to argue and doesn't ever care whether the things he says on day is consistent with what he said the day before. Perhaps he's just a control freak who has some severe psychological problems and feels like he needs to dominate other people to compensate for his own distress. In this case, he is no threat to the movement as a whole, but should be dealt with. It is likely that singling him out at the GA wouldn't work in this case as it would only fuel his psychological distress. The best way to respond to this would be to expel him from the web committee.
(ii) Evan is an agent of imperialism. In this case, he is not paid by the State, but by private organizations that want to harm the Occupy Houston movement. He might also not even be a paid agent, but just himself interested in harming the movement. There are plenty of nutcases in the Tea Party that will try to stir up trouble inside
if [ -n $1 ]; then LOT_IDS=$1
else LOT_IDS=$(
cat <( run-parts --test $INPUT_DIR ) <( run-parts --test $INPUT_DIR/combined) |
perl -pe's/^.*?(?=\d)|_.*//g'
)
fi
if [ -n $1 ]; then LOT_IDS=$1
else LOT_IDS=$(
cat <( run-parts --test $INPUT_DIR ) <( run-parts --test $INPUT_DIR/combined) |
perl -pe's/^.*?(?=\d)|_.*//g'
)
fi
dd
b
:markdown
Yes! Please, please contact Evan Carroll directly at [ecarroll@kha-atheists.org](mailto:ecarroll@kh
| Evan personally pays for all of the group-related expenses and he'd love whatever financial assistanc
< volume: -9
< backlight timeout: 4
< backlight timeout plugged: 5
< selector type: bar (inverse)
< brightness: 1
< foreground color: 000000
< background color: FFFFFF
< party mode: on
< volume fade: off
< scan min step: 30