View MyClass.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ClassLibrary | |
{ | |
public interface IDependency | |
{ | |
void SomeMethod(string s); | |
} | |
public class MyClass |
View PasswordResetService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CORE.Kernel.ExtensionMethods; | |
using CORE.Models; | |
using ServiceStack.Common; | |
using ServiceStack.Common.Web; | |
using ServiceStack.FluentValidation; | |
using ServiceStack.ServiceHost; | |
using ServiceStack.ServiceInterface; | |
using ServiceStack.ServiceInterface.Auth; | |
using ServiceStack.ServiceInterface.ServiceModel; | |
using ServiceStack.ServiceInterface.Validation; |
View gist:5814235
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ServiceStack.Common.Web; | |
using ServiceStack.Logging; | |
using ServiceStack.OrmLite; | |
using ServiceStack.ServiceHost; | |
using ServiceStack.ServiceInterface; | |
using ServiceStack.ServiceInterface.ServiceModel; | |
using ServiceStack.ServiceModel; | |
using System; | |
using System.Collections.Generic; | |
using System.Data; |
View main.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Main(string[] args) | |
{ | |
var appSettings = new AppSettings(); | |
AppConfig config = new AppConfig(appSettings); | |
HostFactory.Run(x => | |
{ | |
x.UseLog4Net(); | |
x.Service<AppHost>(s => | |
{ |
View CustomApplicationStore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DotNetOpenAuth.Configuration; | |
using DotNetOpenAuth.Messaging.Bindings; | |
using DotNetOpenAuth.OpenId; | |
using ServiceStack.Logging; | |
using ServiceStack.Redis; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace CORE.STS |
View git-php-webhook.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or | |
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below). | |
* | |
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/ | |
* | |
* INSTRUCTIONS: | |
* 1. Edit the variables below | |
* 2. Upload this script to your server somewhere it can be publicly accessed |
View gist:be16bc2b77b88a401d5faaf89ed055ac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smbus | |
from gpiozero import Button | |
import time | |
class joystick: | |
def __init__(self, button_pin): | |
self.i2cbus = smbus.SMBus(1) | |
self.i2cbus.write_byte(0x48,0) | |
self.button = Button(button_pin) |
View check_seq_files.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i=1; while true; do fn=$(printf "%05d" $i); if [[ ! -e "img_$fn.jpeg" ]]; then echo "File not found: $fn"; fi ; i=$(expr $i + 1); done | less |
View traffic_light_demo.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gpiozero import LED | |
from time import sleep | |
green = LED(22) | |
amber = LED(27) | |
red = LED(17) | |
def all_off(): | |
green.off() |
View CreateSITSDeveloperPi.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get -y update | |
sudo apt-get -y dist-upgrade | |
sudo apt-get -y install rpi-update | |
sudo rpi-update | |
sudo apt-get -y install python-software-properties | |
sudo apt-add-repository ppa:remmina-ppa-team/remmina-next | |
sudo apt-get -y install remmina freerdp-x11 remmina-plugin-rdp | |
sudo apt-get -y install iceweasel | |
sudo apt-get -y update | |
sudo apt-get -y upgrade |
OlderNewer