Bitcoin miners want their newly-found blocks to propagate across the network as quickly as possible, because every millisecond of delay increases the chances that another block, found at about the same time, wins the "block race."
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
| # Start when system enters runlevel 2 (multi-user mode). | |
| start on runlevel 3 | |
| # Start delayed_job via the daemon control script. | |
| exec su -c "/opt/perl script/app minion worker" bpm | |
| # Restart the process if it dies with a signal | |
| # or exit code not given by the 'normal exit' stanza. | |
| respawn |
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
| <? | |
| ///////////////////// | |
| // slack2html | |
| // by @levelsio | |
| ///////////////////// | |
| // | |
| ///////////////////// | |
| // WHAT DOES THIS DO? | |
| ///////////////////// | |
| // |
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
| print("UPDATE AUG 2023: this script is beyond old and broken") | |
| print("You may find interesting and more up to date resources in the comments of the gist") | |
| exit() | |
| from slacker import Slacker | |
| import json | |
| import argparse | |
| import os | |
| # This script finds all channels, private channels and direct messages |
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
| use Mojolicious::Lite; | |
| use Mojo::EventEmitter; | |
| helper events => sub { state $events = Mojo::EventEmitter->new }; | |
| get '/' => 'chat'; | |
| websocket '/channel' => sub { | |
| my $c = 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
| #!/usr/bin/perl | |
| # Mojo::DOM を使い、 | |
| # DOM form オブジェクトのパラメータを取り出す例 | |
| use Mojo::DOM; | |
| use Data::Dumper; | |
| my $text = do { local $/ = undef; <DATA> }; | |
| my $dom = Mojo::DOM->new($text); | |
| my $forms = forms($dom); | |
| print Data::Dumper->Dump( [$forms] ), "\n"; |
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
| <?php | |
| /* | |
| WORDPRESS SPECIFIC AJAX HANDLER (because admin-ajax.php does not render plugin shortcodes). | |
| by alexandre@pixeline.be | |
| credits: Raz Ohad https://coderwall.com/p/of7y2q/faster-ajax-for-wordpress | |
| */ | |
| //mimic the actual admin-ajax | |
| define('DOING_AJAX', true); | |
| if (!isset( $_REQUEST['action'])) |
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
| <?php | |
| class iCal | |
| { | |
| /** | |
| * @var string | |
| */ | |
| public $title; |
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
| plenv install 5.8.9 \ | |
| -Dcc=gcc \ | |
| -Dld=g++ \ | |
| -Dusethreads \ | |
| -Duseithreads \ | |
| -Duseshrplib \ | |
| -Accflags="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" \ | |
| -Accflags="-mmacosx-version-min=10.6" \ | |
| -Accflags="-arch i386 -DUSE_SITECUSTOMIZE -Duselargefiles" \ | |
| -Aldflags="-Wl,-search_paths_first -arch i386" \ |