Skip to content

Instantly share code, notes, and snippets.

View jrsconfitto's full-sized avatar

James Sconfitto jrsconfitto

View GitHub Profile
@jrsconfitto
jrsconfitto / index.html
Created December 6, 2012 17:49
Why can't i get this working?
<html>
<head>
<style type="text/css">
.chart rect {
stroke: white;
fill: steelblue;
}
.line {
fill: none;
@jrsconfitto
jrsconfitto / amplify.store.js
Last active December 11, 2015 13:38
AmplifyJS store bug on Android
/*!
* Amplify Store - Persistent Client-Side Storage 1.1.0
*
* Copyright 2011 appendTo LLC. (http://appendto.com/team)
* Dual licensed under the MIT or GPL licenses.
* http://appendto.com/open-source-licenses
*
* http://amplifyjs.com
*/
(function( amplify, undefined ) {
@jrsconfitto
jrsconfitto / Gemfile
Created January 25, 2013 19:56
This is a playground for me to try to git a `git log -- [path]` equivalent from Rugged
gem 'rugged', :path => '../rugged'
<Window x:Class="SerialCommunication.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
// Using adafruit's LED library: https://github.com/adafruit/LPD8806
#include <LPD8806.h>
#include <SPI.h>
int dataPin = 2;
int clockPin = 3;
// First parameter is the number of LEDs in the strand. The LED strips
// are 32 LEDs per meter but you can extend or cut the strip. Next two
// parameters are SPI data and clock pins:
@jrsconfitto
jrsconfitto / SerialLED.ino
Last active December 12, 2015 09:28
Arduino LED manipulation sketch
// LED manipulation code
// Borrows code from:
// * Adafruit's LED library: https://github.com/adafruit/LPD8806
// * Arduino example code for serial communication
// * astromaf's RGBLamp code: https://github.com/astromaf/MyRGBLamp
#include <LPD8806.h>
#include <SPI.h>
int dataPin = 2;
@jrsconfitto
jrsconfitto / powershell tips.md
Last active December 13, 2015 21:28
Useful Powershell commands that i can never remember!

PowerShell tips

Because i can never remember stuff and then i end up walking down the same old road until i get to that stackoverflow answer i've already starred.

Environment variables

List them: Get-ChildItem Env: - Creating and modifying environment variables

Get your path in Powershell: $env:path
Make that path readable: $env:path.split(‘;’)

@jrsconfitto
jrsconfitto / Build script
Last active December 18, 2015 12:19
My Nancy root path hacks for debugging views quickly when self-hosting
echo "$(ProjectDir)Web" > "$(OutDir)Debug-Path.txt"
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel='stylesheet' type='text/css' href='' />
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
<meta name='viewport' content='initial-scale=1.0 maximum-scale=1.0'>
</head>
<body>
<script src=''></script>
@jrsconfitto
jrsconfitto / goserve.go
Created September 24, 2013 17:12
Simple static file server in Go
package main
import (
"flag"
"fmt"
"net/http"
"os"
"strings"
"strconv"
)