Skip to content

Instantly share code, notes, and snippets.

View jamiepenney's full-sized avatar

Jamie Penney jamiepenney

View GitHub Profile
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 February 21, 2018 23:14
Check the pwnedpasswords.com database for breached passwords from your local terminal
#!/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"}'
#define MAXTIMINGS 85
#define cli noInterrupts
#define sei interrupts
#define DHT11 11
#define DHT22 22
#define DHT21 21
#define AM2301 21
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;
#!/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 February 14, 2012 19:57
Form builder for Twitter Bootstrap v2 form elements
# 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 September 23, 2011 01:47
Form builder for Twitter Bootstrap form elements.
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