Skip to content

Instantly share code, notes, and snippets.

View georgeredinger's full-sized avatar
💭
Coding

George Redinger georgeredinger

💭
Coding
View GitHub Profile
@elliotlarson
elliotlarson / ibeacon-scan.bash
Last active March 2, 2023 02:07
iBeacon Scanning Bash Script
#!/bin/bash
# iBeacon Scanner
# refactored script from Radius Networks referenced in this StackOverflow answer:
# http://stackoverflow.com/questions/21733228/can-raspberrypi-with-ble-dongle-detect-ibeacons?lq=1
# Process:
# 1. start hcitool lescan
# 2. begin reading from hcidump
# 3. packets span multiple lines from dump, so assemble packets from multiline stdin
# 4. for each packet, process into uuid, major, minor, power, and RSSI
@kuitos
kuitos / range-slider.html
Last active September 25, 2017 22:00
range slider base on angular-material slider
<!--
Created by Kuitos on 2015/03/06 10:15 AM.
Email: kuitos.lau@gmail.com
author: EdwardCTaylor
author: Kuitos
Licence: MIT
-->
<!DOCTYPE html>
<html>
<head>
@bbharris
bbharris / load_cell.agent.nut
Last active November 15, 2020 18:28
Load Cell Example Code
// Copyright (c) 2014 Electric Imp
// This file is licensed under the MIT License
// http://opensource.org/licenses/MIT
const PLOTLY_USER = "XXXXX";
const PLOTLY_KEY = "XXXXX";
// Name your plot
const PLOTLY_FILENAME = "Compensated Weight vs Temp Graph 3kg";
// How much historical data to show in hours (autorange must be disabled)
const GRAPH_WINDOW = 24;
hardware.pin1.configure(ANALOG_IN);
// LED pin config
hardware.pin2.configure(DIGITAL_OUT_OD_PULLUP);
// initially set to off
hardware.pin2.write(0);
/*
If you don't have a Hannah board but want to try the
Cosm.com temperature logging exercise, here it is!
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@kashif
kashif / ubuntu-11.10-gems.erb
Created October 10, 2011 11:58 — forked from bensie/chef_bootstrap_rvm.erb
Chef bootstrap With rvm and ruby 1.9.3 on ubuntu 11.10
bash -c '
<% if knife_config[:bootstrap_proxy] -%>
(
cat <<'EOP'
<%= "proxy = #{knife_config[:bootstrap_proxy]}" %>
EOP
) > ~/.curlrc
<% end -%>
if [ ! -f /usr/bin/chef-client ]; then
@CerebralMastication
CerebralMastication / start-logon-ec2.sh
Created May 6, 2011 21:03
shell script for starting and logging onto an ec2 instance
#!/bin/bash
secGroup="sg-50681d39"
ami="ami-1aad5273"
keyName="ec2ApiTools"
keyLocation="/home/jal/Documents/AWS/ec2ApiTools_rsa_id"
instance_id=$(ec2-run-instances -k $keyName -g $secGroup -t m1.large $ami | awk '/INSTANCE/{print $2}')
echo $instance_id