View .zshrc
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://www.growingwiththeweb.com/2018/01/slow-nvm-init.html | |
if [ -s "$HOME/.nvm/nvm.sh" ] && [ ! "$(whence -w __init_nvm)" = "__init_nvm: function" ]; then | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" | |
declare -a __node_commands=('nvm' 'node' 'npm' 'yarn' 'gulp' 'grunt' 'webpack') | |
function __init_nvm() { | |
for i in "${__node_commands[@]}"; do unalias $i; done | |
. "$NVM_DIR"/nvm.sh | |
unset __node_commands |
View pixel_meter
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
#include <Adafruit_NeoPixel.h> | |
// Which pin on the Arduino is connected to the NeoPixels? | |
// On a Trinket or Gemma we suggest changing this to 1: | |
#define LED_PIN 13 | |
// How many NeoPixels are attached to the Arduino? | |
#define LED_COUNT 24 | |
#define HUE_STEP 512; |
View laravel-sql-debug.php
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 | |
use Illuminate\Support\Facades\Event; | |
use Illuminate\Support\Facades\Log; | |
Event::listen("illuminate.query", function($query, $bindings, $time, $name){ | |
$this->output($query); | |
$this->output(json_encode($bindings)); | |
// Or, send to log: | |
Log::sql($query."\n"); | |
Log::sql(json_encode($bindings)."\n"); |
View redis-settings.php
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
$conf['redis_client_interface'] = 'PhpRedis'; | |
// environment variable: MY_REDIS_HOST | |
$conf['redis_client_host'] = getenv(‘MY_REDIS_HOST'); | |
$conf['lock_inc'] = 'sites/all/modules/contrib/redis/redis.lock.inc'; | |
$conf['path_inc'] = 'sites/all/modules/contrib/redis/redis.path.inc'; | |
$conf['cache_backends'][] = 'sites/all/modules/contrib/redis/redis.autoload.inc'; | |
$conf['page_cache_without_database'] = TRUE; | |
$conf['page_cache_invoke_hooks'] = FALSE; | |
// Use if connecting to Redis by socket |