Skip to content

Instantly share code, notes, and snippets.

Chester Wood chetstone

  • Crestone, CO
Block or report user

Report or block chetstone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chetstone
chetstone / rvm.rb
Created Nov 12, 2011
Using rvm with tcsh
View rvm.rb
#!/usr/bin/env ruby
# riffing on a tune by Paul at po-ru.com
# 1. Using a bash shell, install rvm according to instructions.
# 2. Install this script in your path, say in ~/bin.
# 3. Make it executable.
# 4. Add the following alias to your .tcshrc:
# alias rvm 'eval `~/bin/rvm.rb \!*`'
# 5. Use and enjoy rvm in your tcsh
# Note that this script relies on a ruby already installed in the path.
# It shouldn't be too hard to enhance it to bootstrap itself using rvm.
@chetstone
chetstone / .forward
Last active Jan 4, 2016
Forwarding Ubiquiti AirVision2 (linux) Motion Alerts based on regions
View .forward
# Exim filter
# The first line above must be exactly like that.
#
# Since Airvision2 only has a provision to send email notifications for all regions or none,
# we add this kludge to forward emails based on the region name included in the email.
# Basic steps are these:
# 1. Install a mail server on your ubuntu/debian box if it's not there already. (Not as hard as it sounds.)
# 2. Configure it to forward nonlocal mail to a smarthost.
# 3. Add a user account to Airvision to send notifications to the admin account on the local host.
# 4. Install this file (.forward) in the admin account home directory. (Must be writeable only to the user.)
View xcode-git-version.sh
#!/bin/bash
# This script automatically sets the version and short version string of
# an Xcode project from the Git repository containing the project.
#
# To use this script in Xcode, add the script's path to a "Run Script" build
# phase for your application target.
set -o errexit
set -o nounset
@chetstone
chetstone / Prettier-emacs-config.md
Last active Jul 1, 2017
Configurable per-project options for [prettier-emacs](https://github.com/prettier/prettier-emacs)
View Prettier-emacs-config.md

Given an invocation of prettier in package.json like this:

  "scripts": {
    "prettier": "prettier --write --single-quote --no-semi --trailing-comma es5 --print-width 80 \"*.js\""
  },

Move the options to a config variable like this:

  "scripts": {                  
View dl2_syslog.log
# cat /var/log/messages
Jul 9 22:51:07 resol-dl2 syslog.info syslogd started: BusyBox v1.9.2
Jul 9 22:51:07 resol-dl2 daemon.info init: init: starting pid 772, tty '/dev/null': '/sbin/klogd'
Jul 9 22:51:07 resol-dl2 daemon.info init: init: starting pid 773, tty '/dev/tty3': '/usr/bin/tail'
Jul 9 22:51:07 resol-dl2 authpriv.info dropbear[763]: Running in background
Jul 9 22:51:07 resol-dl2 user.notice kernel: klogd started: BusyBox v1.9.2 (2010-06-26 22:19:34 CEST)
Jul 9 22:51:07 resol-dl2 user.notice kernel: Linux version 2.6.22.1 (daniel@diablo3.resol.de) (gcc version 4.2.1) #1 Sun Jun 27 06:22:13 CEST 2010
Jul 9 22:51:07 resol-dl2 user.warn kernel: CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Jul 9 22:51:07 resol-dl2 user.warn kernel: Machine: Atmel AT91SAM9260-EK
Jul 9 22:51:07 resol-dl2 user.warn kernel: Memory policy: ECC disabled, Data cache writeback
@chetstone
chetstone / Update_DL2_to_1_4_7.md
Last active Sep 10, 2017
Update DL2 firmware from 1.4.4 to 1.4.7
View Update_DL2_to_1_4_7.md

DL2 Update

The trouble is the instructions on the Resol website for this update are wrong. I found helpful instructions on the way back machine, but even those had to be adjusted.

Here's what worked for me:

  1. Make sure you are on firmware version 1.4.5 or lower. Go to http://192.168.1.100/cgi-bin/get_resol_device_information (replace 192.168.1.100 with your DL2’s IP address)
  2. Format your SD card. Formatting on the Mac with MS-DOS(FAT) didn’t work for me. I ended up formatting it on my Panasonic camera.
  3. Insert the freshly-formatted card into the DL2, wait till the flashing green light turns solid. . .
@chetstone
chetstone / mongoinstall.html
Last active Nov 9, 2017
Installing mongoldb on mac with homebrew
View mongoinstall.html
Install MongoDB on Mac OS X Yosemite
by César Trigo · November 6, 2014
from mongodbspain: http://web.archive.org/web/20141121161054/http://www.mongodbspain.com/en/2014/11/06/install-mongodb-on-mac-os-x-yosemite/
OS X Yosemite
Install MongoDB in our Mac is something simple and easy. There are two ways to install MongoDB under Mac OS X:
Manually, through the official binaries
@chetstone
chetstone / README.md
Last active Jun 6, 2018
Notes on provider change from Colorado Central Telecom to Cielo
View README.md

I have been considering using a new DNS server which was written up in USA today, quad9. They do threat analysis and block nefarious sites. Yesterday morning I was doing some pinging of quad9 and Google DNS on Colorado central telecom. I repeated the ping tests after the Cielo install.

They show that Cielo has 2 to 3 times the latency, and a lot more jitter. I wonder if this could be related to DSLReport bufferbloat grade of 'F'.? Probably not, I doubt if ICMP packets are buffered.

@chetstone
chetstone / patch33x.sh
Created Apr 15, 2018
Patching React-Native in a script run by npm/yarn postinstall
View patch33x.sh
#!/bin/sh
# Fix RN version 33
yarn list react-native |grep react-native |grep 0.33
if [ $? -eq 0 ];
then
echo "Checking that ReactNative v 33 is patched"
cd node_modules/react-native
patch -N -p1 --dry-run --silent < ../../notes/rn33.3x.patch >/dev/null 2>&1
if [ $? -eq 0 ];
@chetstone
chetstone / README.md
Last active Sep 13, 2018
Inspecting React-Native AsyncStorage in iOS Simulator
View README.md

First, cd into the Async directory.

cd `xcrun simctl get_app_container booted $BUNDLE_ID data`/Documents/RCTAsyncLocalStorage_V1

Then review the manifest:

jq < manifest.json

Then to pretty-print a non-null value in the manifest:

You can’t perform that action at this time.