This file contains 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 | |
namespace frontend\components; | |
use Yii; | |
/** | |
* Class ThemeAutoloader | |
* | |
* @package frontend\components |
This file contains 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
-- adapted from https://gist.github.com/arbelt/b91e1f38a0880afb316dd5b5732759f1 | |
-- if shift key is held during a caps lock tap, send shift-escape | |
ctrl_table = { | |
send_escape = true, | |
last_mods = {} | |
} | |
control_key_timer = hs.timer.delayed.new(0.15, function() | |
ctrl_table["send_escape"] = false | |
-- log.i("timer fired") |
This file contains 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 | |
namespace console\stream; | |
use phpseclib\Crypt\Base; | |
use React\Stream\ThroughStream; | |
class CipherTransform extends ThroughStream { | |
const OP_ENCRYPT = 'encrypt'; | |
const OP_DECRYPT = 'decrypt'; |
This file contains 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
-server | |
-ea | |
-Xms4096m | |
-Xmx8192m | |
-XX:+UseStringDeduplication | |
-XX:+AggressiveOpts | |
-XX:+UseG1GC | |
-XX:MaxGCPauseMillis=100 | |
-XX:G1HeapRegionSize=2 | |
-XX:ParallelGCThreads=8 |
This file contains 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
const logger = require('winston'); | |
const invalidate = require('invalidate-module'); | |
const { resolve } = require('path'); | |
const chokidar = require('chokidar'); | |
process.on('unhandledRejection', (reason, p) => { | |
logger.error('Unhandled Rejection at: Promise ', p, reason); | |
}); | |
const src = (...args) => resolve(__dirname, ...args); |
This file contains 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 | |
namespace Thruway\Serializer; | |
use MessagePack; // composer dep rybakit/msgpack": "^0.2.2", | |
use Thruway\Message\Message; | |
use Thruway\Message\MessageException; | |
class MsgpackSerializer implements SerializerInterface { | |
/** |
This file contains 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
hhvm.log.level = Warning | |
hhvm.log.always_log_unhandled_exceptions = true | |
hhvm.log.runtime_error_reporting_level = 8191 | |
hhvm.mysql.typed_results = false | |
hhvm.php7.all = true | |
hhvm.php7.builtins= true | |
hhvm.jit_enable_rename_function = true | |
xdebug.idekey = PHPSTORM | |
xdebug.enable = 1 |
This file contains 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 | |
# ======================================== | |
# For /dev/sdXn, | |
# X is one of a,b,c,... | |
# n is one of 1,2,3,... | |
# ======================================== | |
# see https://wiki.archlinux.org/index.php/USB_flash_installation_media#Using_manual_formatting |
This file contains 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 | |
# ============================================================================ | |
# entrypoint.sh | |
# | |
# An entrypoint that blocks until one or more TCP hosts become availabile | |
# ============================================================================ | |
set -e |
This file contains 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
// ============================================================================ | |
// Author: Arleigh Dickerson | |
// (adapted from https://github.com/eliaslfox/lazy-chain) | |
// ============================================================================ | |
const _ = require('lodash'); | |
const Deferred = require('./Deferred'); | |
const pipe = Symbol('asyncBuilder.lazyHander.pipe'); | |
const lazyHandler = app => ({ |