Skip to content

Instantly share code, notes, and snippets.

Working from home

Tommy Ready tommyready

Block or report user

Report or block tommyready

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
tommyready / iis-create-sites.ps1
Created Mar 19, 2019
Windows Powershell Script to Create IIS Sites for Current User
View iis-create-sites.ps1
# IIS Site Creation Tool
# Verion: 0.0.1
# Author: Tommy Ready <>
# Description: Powershell Tool for auto creation of IIS sites per the user logged in.
# Run Command: C:\> .\iis-site-creator.ps1
$current_user = $env:UserName
$user_iis_folder = "C:\sites\$current_user"
$shared_directory = "C:\sites\shared"
$shared_media_direectory = $shared_directory + "\Data"
tommyready / ImapService.php
Last active Jun 18, 2018
Laravel IMAP Service
View ImapService.php
namespace App\Services;
class ImapService {
protected $imapHost;
protected $imapEmail;
protected $imapPassword;
protected $searchCriteria;
tommyready /
Created Oct 16, 2017
Using Python to dump a Mysql database and import into another Mysql database
#!/usr/bin/env python
import ConfigParser
import os
import time
import getpass
def combine_files(self,file1,file2):
with open('file1', 'w') as outfile:
with open(file2) as infile:
tommyready /
Created Oct 16, 2017 — forked from sagar-webonise/
Python script for taking mysqldump
#!/usr/bin/env python
import ConfigParser
import os
import time
import getpass
def get_dump():
print "Enter user:"
user = raw_input()
tommyready /
Last active Oct 6, 2017
Using Python to Zip a Directory then Upload to AWS S3
import os, sys
import math
import boto
import string
import shutil
from os import path
from os import stat
from array import *
from time import gmtime, strftime
from boto.s3.key import Key
tommyready /
Last active Jan 10, 2018
Python Laravel Deployment Script
import git
import string
import os
from os import path
from git import *
from subprocess import call
class gitConnect():
def deploy(self):
tommyready / PDOService.php
Last active Jul 2, 2018
Laravel 5 Service that Wraps PDO to call StoredProcedure with Multiple ResultSets and Return Arrays of Data
View PDOService.php
namespace App\Services;
class PDOService {
private $connection;
public function __construct($connection) {
$this->connection = $connection;
tommyready / imageColor.js
Created Aug 5, 2017
Use pure JavaScript to get the color of a pixel on click
View imageColor.js
<script type="text/javascript" language="javascript">
var img = document.getElementById("myImage");
img.addEventListener("click", function(event) {
var canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
canvas.getContext('2d').drawImage(img, 0, 0, img.width, img.height);
var p = canvas.getContext('2d').getImageData(event.offsetX, event.offsetY, 1, 1).data;
var hex = "#" + ("000000" + rgbToHex(p[0], p[1], p[2])).slice(-6);
tommyready /
Created Jul 19, 2017
Use Python to Automate Host File Edits
import os
import datetime
import re
import socket
import struct
import uuid
def normalize_ipv4(ip):
tommyready / CloudFlareApiClient.cs
Last active Feb 28, 2018
Update Cloud Flare DNS Record via Cloud Flare API v4 using C#
View CloudFlareApiClient.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace CloudFlareApiClient
class Program
You can’t perform that action at this time.