- gabrielfalcao/HTTPretty · GitHub - https://github.com/gabrielfalcao/httpretty
- vfaronov/turq · GitHub - https://github.com/vfaronov/turq#readme
- disqus/mockhttp · GitHub - https://github.com/disqus/mockhttp
- bbangert/Dalton · GitHub - https://github.com/bbangert/Dalton
- kadirpekel/hammock · GitHub - https://github.com/kadirpekel/hammock
This file contains 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
-module(web_lager_handler). | |
-behaviour(gen_event). | |
-export([subscribe/1, unsubscribe/1]). | |
-export([init/1, handle_call/2, handle_event/2, handle_info/2, terminate/2, | |
code_change/3]). | |
-export([remover_loop/0]). |
This file contains 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
-module(json_parser). | |
-export([decode_api/1]). | |
-record(api, { | |
status, | |
message, | |
timeout | |
}). | |
-record(api1, { |
This file contains 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
var util = require('util'); | |
var dgram = require('dgram'); | |
function logstashUDP(host, port, type, message, fields, callback) { | |
var client = dgram.createSocket('udp4'); | |
var logObject = { | |
'@timestamp': (new Date).toISOString(), | |
type: type, | |
message: message, | |
fields: fields |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Kenneth Reitz's GitHub Syncer | |
This script uses the GitHub API to get a list of all forked, mirrored, public, and | |
private repos in your GitHub account. If the repo already exists locally, it will | |
update it via git-pull. Otherwise, it will properly clone the repo. | |
It will organize your repos into the following directory structure: |
This file contains 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 requests | |
import time | |
import json | |
arr = [] | |
end_cursor = '' # empty for the 1st page | |
tag = 'russia' # your tag | |
page_count = 5 # desired number of pages | |
for i in range(0, page_count): | |
url = "https://www.instagram.com/explore/tags/{0}/?__a=1&max_id={1}".format(tag, end_cursor) | |
r = requests.get(url) |
This file contains 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
#!/usr/bin/env python | |
""" | |
A script to query the Amazon Web Services usage reports programmatically. | |
Ideally this wouldn't exist, and Amazon would provide an API we can use | |
instead, but hey - that's life. | |
Basically takes your AWS account username and password, logs into the | |
website as you, and grabs the data out. Always gets the 'All Usage Types' |
This file contains 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
#!/usr/bin/env python | |
# | |
# Copyright 2012 Patrick Hetu <patrick.hetu@gmail.com> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
This file contains 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 Foundation | |
import UIKit | |
extension UIColor { | |
convenience init(hexString:String) { | |
let hexString:NSString = hexString.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) | |
let scanner = NSScanner(string: hexString) | |
if (hexString.hasPrefix("#")) { | |
scanner.scanLocation = 1 |
This file contains 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 base64 | |
import struct | |
import datetime | |
import binascii | |
from urllib.parse import quote_plus | |
# pip install pycryptodomex | |
from Cryptodome import Random | |
from Cryptodome.Cipher import AES |
OlderNewer