Skip to content

Instantly share code, notes, and snippets.

Jamie Penney jamiepenney

Block or report user

Report or block jamiepenney

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
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
jamiepenney / test_password.sh
Last active Feb 21, 2018
Check the pwnedpasswords.com database for breached passwords from your local terminal
View test_password.sh
#!/bin/bash
read -s -p "Enter password to check: " password
echo ""
echo "Checking that password..."
hash=$(echo -n "$password" | openssl sha1 | tr '[:lower:]' '[:upper:]')
curl -s "https://api.pwnedpasswords.com/range/$(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;
View do-release.sh
#!/bin/bash
SERVER="your octopus server here"
APIKEY="your api key here"
VERSION=""
TEST=0
REUSE_NOTES=0
DEPLOY_TARGET="Office"
DEPLOY_ONLY=0
while getopts "v:tre:d" opt; do
case $opt in
@jamiepenney
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
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]
""
else
errors = object.errors[field.to_sym]
if errors.empty? then "" else errors.first end
end
end
You can’t perform that action at this time.