Skip to content

Instantly share code, notes, and snippets.

View rymcol's full-sized avatar

Ryan Collins rymcol

View GitHub Profile
@rymcol
rymcol / cPanel Account Creator
Last active May 20, 2016 22:41
Creates cPanel Accounts from a txt file list of domains
#!/usr/bin/env python
from urllib import urlencode
import httplib2, base64, json
filewithdomains = '/path/to/domains.txt'
resellerlogin = 'root'
resellerpass = 'password'
whmip = '123.456.789.000'
@rymcol
rymcol / perfect-handler-boilerplate.swift
Created April 25, 2016 19:27
Generic boilerplate code for new Perfect handlers
import PerfectLib
//public method that is being called by the server framework to initialise your module.
public func PerfectServerModuleInit() {
 
    // Install the built-in routing handler.
    // Using this system is optional and you could install your own system if desired.
    Routing.Handler.registerGlobally()
 
    // Create Routes
    Routing.Routes["GET", ["/", "index.html"] ] = { (_:WebResponse) in return IndexHandler() }
@rymcol
rymcol / UIColorFromHex.swift
Last active April 15, 2016 22:56
UIColor Extension to Initialize from HEX Color Values
//
// UIColor Extension.swift
// Uses Swift 2.0
//
// Created by Ryan Collins on 9/22/15.
//
//
import Foundation
import UIKit