Skip to content

Instantly share code, notes, and snippets.

Smart Puck'in

Kevin Sidwar sidwarkd

Smart Puck'in
Block or report user

Report or block sidwarkd

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
sidwarkd / .gitignore
Created Nov 27, 2011
Very basic Node.js app using MongoLab and Heroku
View .gitignore
sidwarkd / gist:6303353
Created Aug 22, 2013
Bookmarklet To Extend Tweet Menu
View gist:6303353
$(this).prepend('<li><a role="button" class="my-custom-link" class="js-tooltip" href="#"><b>My Option</b></a></li>');
var el = $( || $(evt.srcElement);
var tweetText = el.closest(".content").find("p.tweet-text").first().text();
alert("This is the text from the tweet that you can use for something:\n\n" + tweetText);
sidwarkd /
Last active Dec 24, 2015 — forked from eduardkoller/
Modified to add command line option for running on a Raspberry Pi using GPIO 17 and 18 to control status LEDs. Run from the command line with the argument "pi" to activate status LEDs. Assumes you have already installed the RPi.GPIO library.
#!/usr/bin/env python
# file:
# description: checks for the "Government has shut down" message
# usage: ./ [pi]
# Passing argument 'pi' causes status LEDs to be used
# or in a crontab:
sidwarkd /
Created Feb 20, 2014
Tracking Olympic Medals with the Raspberry Pi
import sys, urllib
from time import sleep
import spidev
def spi_send(bus, data):
xfer_list = []
if type(data) == str:
for c in data:
elif type(data) == list:
sidwarkd / pi_stats.js
Last active Feb 5, 2019
Python and NodeJS example code for getting memory and cpu usage information on the Raspberry Pi
View pi_stats.js
'use strict'
// A very simple nodeJS script that demonstrates how you can access
// memory usage information similar to how free -m works on the
// Raspberry Pi. Goes with µCast #14.
// Usage: node pi_mem.js
// Example Output
sidwarkd /
Created Mar 18, 2014
Streaming temperature readings with, TMP106, and Raspberry Pi
import RPi.GPIO as GPIO
import spidev
from time import sleep, localtime, strftime, time
import sys
import smbus
class PiHardware(object):
def __init__(self):
sidwarkd / pinode_stats.js
Last active Aug 29, 2015
Nodes JS module for getting simple runtime info from the Raspberry Pi
View pinode_stats.js
'use strict'
// An example of accessing system information on the Raspberry Pi with NodeJS
var fs = require('fs');
var PiStats = function(){
var stats = {};
var _currentCPUInfo = {total:0, active:0};
var _previousCPUInfo = {total:0, active:0};
sidwarkd / www
Last active Aug 29, 2015
A Physical Yo Button
View www
#!/usr/bin/env node
var app = require('../app');
var io = null;
app.set('port', process.env.PORT || 3000);
app.get('/new', function(req, res){
io.emit('yoReceived', req.query.username);
sidwarkd / edison_pins.json
Last active Aug 29, 2015
Descriptive JSON of Edison Mini Breakout Pins
View edison_pins.json
"jumper": 17,
"pin": 1,
"name": "GP182_PWM2",
"description": "GPIO capable of PWM output.",
"tags": ["gpio", "pwm"]
"jumper": 17,
sidwarkd / hcidump.log
Created Feb 5, 2015
Logs for BLE issue with Bleno
View hcidump.log
HCI sniffer - Bluetooth packet analyzer ver 2.4
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Command Complete (0x0e) plen 4
LE Set Advertise Enable (0x08|0x000a) ncmd 1
status 0x0c
Error: Command Disallowed
> HCI Event: Command Complete (0x0e) plen 4
LE Set Advertise Enable (0x08|0x000a) ncmd 1
status 0x00
> HCI Event: Command Complete (0x0e) plen 4
You can’t perform that action at this time.