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
''' | |
dependencies: | |
requests | |
http://www.python-requests.org/ | |
pip install requests | |
beautifulsoup4 | |
http://www.crummy.com/software/BeautifulSoup/ | |
pip install beautifulsoup4 | |
''' |
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
/* | |
* Ugly, deprecated code, just archived as a gist | |
* | |
* If you're looking for an example implementation for a brute force algorithm, | |
* you may want to look at this repo: https://github.com/jwoschitz/Brutus/ | |
*/ | |
class Program | |
{ | |
#region Private variables |
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
''' | |
/* @Cleanup\Delete("SomeRandomString-123") */ | |
// @Cleanup\Delete("asd") | |
''' | |
import os, re, argparse | |
class Filter(): | |
def matches(self): | |
raise NotImplementedError() |
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 httplib | |
import time | |
def get_current_time(): | |
return time.strftime("%Y/%m/%d %H:%M:%S", time.localtime()) | |
def get_connection(domain, port): | |
if port == httplib.HTTPS_PORT: | |
return httplib.HTTPSConnection(domain) | |
return httplib.HTTPConnection(domain) |
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
<html> | |
<body> | |
html5 audio test | |
</body> | |
<script> | |
/* | |
tried to use the HTML5 audio without <audio /> tags, just JavaScript | |
works in Chrome, also in FF if you replace .mp3 with .ogg - does not work in Safari | |
*/ | |
window.onload = function(){ |
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
/api/stations/status | |
============ | |
stations: [ | |
{ | |
"id": 1, | |
"name": "U Friedrichstr.", | |
"lifts_total": 4, | |
"lifts_working": 3 | |
}, | |
{ |
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
SELECT DATEADD(DAY, 0, DATEDIFF(DAY, 0, GETDATE())) | |
-- Selects the current date as datetime, e.g. 2011-09-10 00:00:00.000 | |
SELECT CONVERT(VARCHAR(8), GETDATE(), 112) | |
-- Selects the current date as varchar, e.g. 20110910 |
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
SELECT DATE('2011-09-10 11:24:03'); | |
#Prints 2011-09-10 | |
SELECT CURDATE() | |
#Prints the current date, e.g. 2011-09-10 |
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
/* | |
Creates multiple batch statements to run a sql statement with a delay in between each batch execution. | |
*/ | |
DECLARE | |
@ReportTimeStamp DATETIME, | |
@ExitConditionTimeStamp DATETIME, | |
@Sql NVARCHAR(MAX), | |
@ParamsDefinition NVARCHAR(MAX), | |
@IntervalInSeconds INT, |
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
DECLARE @XML AS XML | |
SELECT @XML = BulkColumn FROM OPENROWSET(BULK '\\a\file\path\to\your\document.xml', single_blob) AS R |