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
# Used for unshortening list of urls as wel as checking the HTTP status code of a webpage. | |
# When called from the command line, requires either a filename or STDIN as input | |
# Filename or standard input should contain one URL per line | |
# Output is printed to the standard out and saved to a JSON file using PickleDB. | |
__author__ = "Tim Hopper" | |
__email__ = "[email protected]" | |
import fileinput | |
import urllib2 |
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
require 'childprocess' | |
guard 'shell' do | |
watch %r{^app/(.+)\.rb$} do |m| | |
`killall rake` | |
# Why this: | |
# - spawn a child process to avoid locking Guard | |
# - make sure that the child process has stdout and stdin otherwise it crashes | |
# - bonus point: get REPL access in the simulator! |
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
# | |
# Copyright 2012 Mortar Data Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
<?php | |
// Request URL | |
$url = 'http://www.google.com/'; | |
// HTTP headers | |
$headers = array( | |
//'Content-Type: application/json', | |
//'Accept: application/json', | |
); |