Skip to content

Instantly share code, notes, and snippets.

Jamie Penney jamiepenney

View GitHub Profile
View InfusionGateway.cs
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace InfusionDemo
class Program
jamiepenney /
Last active Feb 21, 2018
Check the database for breached passwords from your local terminal
read -s -p "Enter password to check: " password
echo ""
echo "Checking that password..."
hash=$(echo -n "$password" | openssl sha1 | tr '[:lower:]' '[:upper:]')
curl -s "$(echo $hash | head -c5)"|\
grep $(echo $hash | cut -c 6-) |\
awk '{split($0,a,":"); print "Your password has been found in the breach database"} END { if (!NR) print "Password not found in database"}'
View Spark-DHT22.pde
#define MAXTIMINGS 85
#define cli noInterrupts
#define sei interrupts
#define DHT11 11
#define DHT22 22
#define DHT21 21
#define AM2301 21
View gist:66eff1058675dea05355
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using Caliburn.Micro;
using ListenToMe.Models;
using ListenToMe.ViewModels;
using ListenToMe.ViewModels.Pages;
using QEDCode;
SERVER="your octopus server here"
APIKEY="your api key here"
while getopts "v:tre:d" opt; do
case $opt in
jamiepenney / bootstrap.rb
Created Feb 14, 2012
Form builder for Twitter Bootstrap v2 form elements
View bootstrap.rb
# This file goes in config/initializers
require 'bootstrap_form_builder'
# Make this the default Form Builder. You can delete this if you don't want form_for to use
# the bootstrap form builder by default
ActionView::Base.default_form_builder = BootstrapFormBuilder::FormBuilder
# Add in our FormHelper methods, so you can use bootstrap_form_for.
ActionView::Base.send :include, BootstrapFormBuilder::FormHelper
jamiepenney / bootstrap_form_builder.rb
Created Sep 23, 2011
Form builder for Twitter Bootstrap form elements.
View bootstrap_form_builder.rb
class BootstrapFormBuilder < ActionView::Helpers::FormBuilder
def get_error_text(object, field, options)
if object.nil? || options[:hide_errors]
errors = object.errors[field.to_sym]
if errors.empty? then "" else errors.first end
You can’t perform that action at this time.