Skip to content

Instantly share code, notes, and snippets.

@TristanV12
TristanV12 / disasterRecoveryEC2LambdaFunction.py
Created April 15, 2019 14:49
AWS Lambda Function that backs up ec2 images and volumes from one primary region to a disaster recovery region
import boto3
from datetime import date, timedelta
import datetime
###################
# Global Constants
###################
TESTING = False # true if we are ignoring the time interval
START_HOUR = 4 # start at 4 am
HOURS_IN_DAY = 24 # unlikely to change
@evantahler
evantahler / dmx.js
Last active July 26, 2018 19:59
enttec open dmx + nodejs
#!/usr/bin/env node
// A simple DMX example which will turn all the lights on and off every second
// You can use this as a fork within another application as well (cluster-awareness)
////////////
// dmx.js //
////////////
var ftdi = require('ftdi');
@yatt
yatt / tesseract-ocr-class.cs
Created April 12, 2011 12:49
simple c# class for Optical Character Recognition(OCR) using tesseract (http://code.google.com/p/tesseract-ocr/) usage: pass .exe path to constructor
// usage:
//
// TesseractOCR ocr = TesseractOCR(@"C:\bin\tesseract.exe");
// string result = ocr.OCRFromBitmap(bmp);
// textBox1.Text = result;
//
using System;
using System.IO;
using System.Diagnostics;
using System.Drawing;