Skip to content

Instantly share code, notes, and snippets.

View rymcol's full-sized avatar

Ryan Collins rymcol

View GitHub Profile
@rymcol
rymcol / ssh-copy-kr-id.fish
Created January 26, 2018 12:02
Wrapper for copying krypton public key through ssh-copy-id
function ssh-copy-kr-id
ssh-copy-id -f -i ~/.ssh/id_krypton.pub $argv
end
@rymcol
rymcol / globalgitgpg.sh
Last active May 19, 2018 19:46
Global GPG Commit Signing for Git
#!/bin/bash
#Setup git
git config --global user.name "My Name"
git config --global user.email "my@email.com"
#Setup Signing Key
git config --global user.signingkey <key id here>
#Sign All
git config --global commit.gpgsign true
#Allow programs like Xcode, Tower, and SourceTree to Work with Globabl GPG Signing

Keybase proof

I hereby claim:

  • I am rymcol on github.
  • I am collins (https://keybase.io/collins) on keybase.
  • I have a public key whose fingerprint is 2745 210F 8BCA 3234 8ABB C852 1107 08F9 8B65 5205

To claim this, I am signing this object:

@rymcol
rymcol / arc4random_uniform_ubuntu.swift
Created September 22, 2016 22:15
Enables arc4random_uniform in Swift on Ubuntu, just add this to the top of your main.swift file under the rest of your imports.
#if os(Linux)
import SwiftGlibc
public func arc4random_uniform(_ max: UInt32) -> Int32 {
return (SwiftGlibc.rand() % Int32(max-1))
}
#endif
@rymcol
rymcol / cleanbuild.fish
Created August 17, 2016 17:37
Fish Function (alias) for Rebuilding Swift Projects Including Fresh Dependency Pulls
function cleanbuild
swift build --clean=dist; and swift build
end
@rymcol
rymcol / rebuild.fish
Created August 17, 2016 17:36
Fish Function (alias) for Rebuilding Swift Projects
function rebuild
swift build --clean; and swift build
end
#element li {
border: 1px solid #000;
display: -moz-inline-stack;
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;
_height: 250px;
}
~/Library/Containers/com.apple.iWork.Pages/Data/Library/Application Support/User Templates
import urllib2 as ur
import re
f = ur.urlopen(u'http://website.com/SiteMap.xml')
res = f.readlines()
for d in res:
data = re.findall('<loc>(http:\/\/.+)<\/loc>',d)
for i in data:
print i
@rymcol
rymcol / bulk_cpanel_whm_password_resets.py
Created May 20, 2016 22:37
Bulk Password Reset for WHM/cPanel in Python
#!/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'