Skip to content

Instantly share code, notes, and snippets.

View buley's full-sized avatar
🤑

Tay buley

🤑
View GitHub Profile
@jherax
jherax / is-private-mode.js
Last active March 19, 2024 18:29
Detect if the browser is running in Private mode - Promise based (last update: Feb 2020)
/**
* Lightweight script to detect whether the browser is running in Private mode.
* @returns {Promise<boolean>}
*
* Live demo:
* @see https://output.jsbin.com/tazuwif
*
* This snippet uses Promises. If you want to run it in old browsers, polyfill it:
* @see https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js
*
Sacramentio Police and Fire Frequencies
SACRAMENTO COUNTY SHERIFF
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
#!/bin/bash
# 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 docker.io*
@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# 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 (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@svyatogor
svyatogor / gist:89c9ccbbe3f33cb599bf
Created April 22, 2015 22:08
upload dSYM to bugsnag after archive:distribution task in your rubymotion project
task "upload_dsym" do
dsym_path = App.config.app_bundle_dsym(App.config.deploy_platform)
app_name = App.config_without_setup.name
`curl https://upload.bugsnag.com/ -F dsym=@"#{dsym_path}/Contents/Resources/DWARF/#{app_name}"`
end
namespace :archive do
task :distribution do
Rake::Task['upload_dsym'].invoke
end
@comerford
comerford / mongo-rocks-startup.log
Last active August 29, 2015 14:18
Mongo Rocks Startup
./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
afolarin / resource_alloc_docker.md
Last active March 18, 2024 17:01
Resource Allocation in Docker

#Container Resource Allocation Options in docker-run

now see: https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

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
najeira / gist:280c347ecb6bd9f2e680
Created August 15, 2014 03:20
Golang BigQuery example
package main
import (
bigquery "code.google.com/p/google-api-go-client/bigquery/v2"
"code.google.com/p/goauth2/oauth/jwt"
"encoding/json"
"fmt"
)
func main() {
@iand
iand / README.md
Created June 26, 2014 12:52
Getting started with Cayley
@brigand
brigand / app.js
Last active June 29, 2017 15:52
React JS Event-Emitter Mixin and Example
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 {