This file contains hidden or 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 xlrd | |
name = input('file: ') | |
wb = xlrd.open_workbook(name) | |
sheet = wb.sheet_by_index(0) | |
lookup = { | |
'name': 0, | |
'website': 1 |
This file contains hidden or 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
class Request { | |
var url: String | |
var requestType: RequestType | |
var body: NSData? | |
var headers: Dictionary<String, String>? | |
init(url: String, requestType: RequestType, body: NSData?, headers: Dictionary<String, String>?) { | |
self.url = url | |
self.requestType = requestType |
This file contains hidden or 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
#!/bin/sh | |
PID="$(pgrep -f tomcat-7.0.53-9090)" | |
echo "Tomcat PID: $PID" | |
if [ -z "$PID" ] | |
then | |
echo 'Tomcat is not running.' | |
else |
This file contains hidden or 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
# Simple ruby snippet to get the id for a vimeo url. This was based on this gist: https://gist.github.com/wwdboer/4943672 | |
# This should be able to handle the following formats: | |
# http://vimeo.com/12345 | |
# http://player.vimeo.com/video/12345 | |
# http://player.vimeo.com/video/12345?test=value1 | |
# http://player.vimeo.com/video/12345/?test=value1 | |
# http://vimeo.com/channels/testchannel/12345 | |
# http://vimeo.com/groups/testgroup/videos/1234 | |
def vimeo_id(url) |
This file contains hidden or 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
function get_vimeoid( $url ) { | |
$regex = '~ | |
# Match Vimeo link and embed code | |
(?:<iframe [^>]*src=")? # If iframe match up to first quote of src | |
(?: # Group vimeo url | |
https?:\/\/ # Either http or https | |
(?:[\w]+\.)* # Optional subdomains | |
vimeo\.com # Match vimeo.com | |
(?:[\/\w]*\/?)? # Optional video sub directory this handles groups links also | |
\/ # Slash before Id |