This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH | |
times AS ( | |
SELECT ROW_NUMBER() OVER (ORDER BY time) AS sort, time | |
FROM ( | |
SELECT DISTINCT time | |
FROM ( | |
SELECT start_time AS time | |
FROM workshops | |
WHERE TO_CHAR(day, 'FMDay') = 'Friday' | |
UNION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# default to apache/postgres if env is not set up; probably means we're on | |
# a vagrant VM; same for work dir | |
user=${PGUSER:-apache} | |
db=${PGDATABASE:-postgres} | |
base=${BASEDIR:-/vagrant} | |
# get the current schema version, or assume we're on an empty DB/version 0 | |
cur_version=$(psql -t -d $db -U $user -c "SELECT schema_version()" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
my ($fail) = 0; | |
my ($linters) = { | |
php => [qr/\.(php|inc)$/i, 'php -l', '%s --'], | |
perl => [qr/\.(pl|pm|t)$/i, 'perl -cw', '%s'], | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sycobuny@valhalla:~/gittest$ git init . | |
Initialized empty Git repository in /home/sycobuny/gittest/.git/ | |
sycobuny@valhalla:~/gittest$ touch first | |
sycobuny@valhalla:~/gittest$ git add first | |
sycobuny@valhalla:~/gittest$ git commit -m "first" | |
[master (root-commit) be18d08] first | |
0 files changed | |
create mode 100644 first | |
sycobuny@valhalla:~/gittest$ git checkout -b branch | |
Switched to a new branch 'branch' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================================================================================================================================================================================================================================================================================================== | |
Package Arch Version Repository Size | |
============================================================================================================================================================================================================================================================================================================================== | |
Installing: | |
redhat-lsb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use v5.18; | |
use warnings; | |
no warnings qw(experimental::lexical_subs); | |
use feature qw(lexical_subs); | |
package MyObject { | |
sub new { bless({}, __PACKAGE__) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
# some example values to test | |
our (%STUFF) = ( # just doin' a hash, like a boss. | |
SOME_KEY => 'some_value', | |
SOME_OTHER_KEY => 'some_other_value', | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var addCell = function($row, inner, addAs) { | |
var $cell = $(document.createElement('td')) | |
{ | |
html: function() { $cell.html (inner) }, | |
text: function() { $cell.text (inner) }, | |
child: function() { $cell.append(inner) } | |
}[addAs ? addAs : 'text']() | |
$row.append($cell) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use v5.14; | |
my $empty_list = sub { | |
shift->(undef, undef, 1); | |
}; | |
my $prepend = sub { | |
my $el = shift; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git status | |
# On branch master | |
# Your branch is behind 'origin/master' by 19 commits, and can be fast-forwarded. | |
# | |
nothing to commit (working directory clean) | |
$ git pull origin master | |
[output snipped] | |
$ git status | |
# On branch master | |
# Your branch is ahead of 'origin/master' by 1 commit. |