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/perl | |
use warnings; | |
use strict; | |
package MyBot; | |
use base qw( Bot::BasicBot ); | |
# the 'said' callback gets called when someone says something in | |
# earshot of the bot. | |
sub said { |
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
DELETE | |
sip | |
FROM | |
search_index_products sip | |
JOIN products p ON sip.productId=p.productId AND (sip.countryId=p.countryId OR (p.countryId=? AND p.productId NOT IN (SELECT productId FROM | |
products WHERE countryId=?))) | |
WHERE | |
p.refreshCache=1 | |
AND sip.countryId=? |
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
SELECT * | |
FROM products | |
WHERE productId IN ( | |
SELECT relatedId | |
FROM product_suggestions | |
WHERE productId=? | |
) | |
AND live=1 | |
AND archive=0 | |
AND ( |
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
sub notes { | |
my ($pattern, @scale) = @_; | |
return map { $note < @scale ? $scale[$note] : undef } split //, $pattern; | |
} | |
#... | |
for my $note (notes($pattern, @scale)) { | |
if (defined $note) { |
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
$ re.pl | |
$ use warnings; use 5.010; | |
$ (0 > undef) . "\n" | |
Use of uninitialized value in numeric gt (>) at (eval 309) line 5, <FIN> line 2. | |
$ (0 >= undef) . "\n" | |
Use of uninitialized value in numeric ge (>=) at (eval 310) line 5, <FIN> line 3. | |
1 | |
$ (0 == undef) . "\n" | |
Use of uninitialized value in numeric eq (==) at (eval 311) line 5, <FIN> line 4. |
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/perl | |
use strict; | |
use warnings; | |
use Cwd; | |
use Data::Dumper; # yes really | |
use File::Basename; | |
use Daemon::Control; | |
use IO::Prompt::Tiny qw/prompt/; |
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
$ PATH_INFO="/altre.us.git/HEAD" GIT_PROJECT_ROOT=/opt/git REQUEST_METHOD=GET /usr/lib/git-core/git-http-backend | |
Expires: Fri, 01 Jan 1980 00:00:00 GMT | |
Pragma: no-cache | |
Cache-Control: no-cache, max-age=0, must-revalidate | |
Content-Length: 23 | |
Content-Type: text/plain | |
Last-Modified: Thu, 22 May 2014 12:23:33 +0000 | |
ref: refs/heads/master |
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
function delayedAddIcon(chart, flags) { | |
if ($('#topSubscribers .highcharts-container').length) { | |
addIcon(chart, flags); | |
} | |
else { | |
setTimeout(function() { | |
delayedAddIcon(chart, flags); | |
}, 100); | |
} | |
} |
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
Rebase example! | |
=============== | |
I forgot to commit some things remotely before I cloned my repo to work locally. | |
altreus@local:~ $ git clone altre.us:altre.us | |
Cloning into altre.us ... | |
<snip> | |
altreus@local:~/altre.us $ do_stuff | |
altreus@local:~/altre.us $ git commit -a -m"Turn off static cache for now" |
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
$ time git stash pop | |
On branch user-page | |
Changes not staged for commit: | |
(use "git add <file>..." to update what will be committed) | |
(use "git checkout -- <file>..." to discard changes in working directory) | |
modified: fuel/app/modules/management/views/user/list.php | |
Untracked files: | |
(use "git add <file>..." to include in what will be committed) |