Skip to content

Instantly share code, notes, and snippets.


Taylor buley

  • McNaughton Newspapers, Inc.
  • Winters, California
View GitHub Profile
jherax / is-private-mode.js
Last active Apr 24, 2022
Detect if the browser is running in Private mode - Promise based (last update: Feb 2020)
View is-private-mode.js
* Lightweight script to detect whether the browser is running in Private mode.
* @returns {Promise<boolean>}
* Live demo:
* @see
* This snippet uses Promises. If you want to run it in old browsers, polyfill it:
* @see
View gist:e5fe901d80c7a62b15206d703a781b5b
Sacramentio Police and Fire Frequencies
Channel 1 Ch1 North patrol/STAR 453.900
Channel 2 Ch2 Records/tactical 453.250
Channel 3 Ch3 South patrol 453.575
Channel 4 Ch4 Long range tac 453.675
Channel 5 Ch5 Short range tac 453.475
Channel 6 Tactical (simplex) 453.950
View Kali 2016.1, Docker Install script
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get purge lxc-docker*
sudo apt-get purge*
chrismdp /
Last active May 5, 2022
Uploading to S3 in 18 lines of Shell (used to upload builds for
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (
# Based on a modified script from here:
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
svyatogor / gist:89c9ccbbe3f33cb599bf
Created Apr 22, 2015
upload dSYM to bugsnag after archive:distribution task in your rubymotion project
View gist:89c9ccbbe3f33cb599bf
task "upload_dsym" do
dsym_path = App.config.app_bundle_dsym(App.config.deploy_platform)
app_name =
`curl -F dsym=@"#{dsym_path}/Contents/Resources/DWARF/#{app_name}"`
namespace :archive do
task :distribution do
comerford / mongo-rocks-startup.log
Last active Aug 29, 2015
Mongo Rocks Startup
View mongo-rocks-startup.log
./mongod --storageEngine=rocksdb
2015-04-03T19:09:38.983+0100 I STORAGE Compression: snappy
2015-04-03T19:09:38.983+0100 I STORAGE MaxWriteMBPerSec: 1024
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten] MongoDB starting : pid=16433 port=27017 dbpath=/data/db 64-bit host=fed-vm
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten]
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten] ** NOTE: This is a development version (3.1.1-pre-) of MongoDB.
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten] ** Not recommended for production.
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten]
2015-04-03T19:09:39.043+0100 I CONTROL [initandlisten]
2015-04-03T19:09:39.043+0100 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
afolarin /
Last active Apr 15, 2022
Resource Allocation in Docker

#Container Resource Allocation Options in docker-run

now see:

You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.

##Dynamic CPU Allocation -c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)

najeira / gist:280c347ecb6bd9f2e680
Created Aug 15, 2014
Golang BigQuery example
View gist:280c347ecb6bd9f2e680
package main
import (
bigquery ""
func main() {
iand /
Created Jun 26, 2014
Getting started with Cayley
brigand / app.js
Last active Jun 29, 2017
React JS Event-Emitter Mixin and Example
View app.js
var React = require("react"), Dom = React.DOM;
var LogOutButton = require('./src/logout');
var events = require('api/events');
var Main = React.createClass({
// this mixin provides this.emitLogout, and if we set onLogout it'll be called when "logout" is emitted
mixins: [events.mixinFor("logout")],
getInitialState: function(){
return {