Skip to content

Instantly share code, notes, and snippets.

@holydevil
holydevil / hack.sh
Created August 21, 2012 14:20 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@holydevil
holydevil / yql-finance-quotes.php
Created August 20, 2011 14:55
YQL for Finance quotes
<h2>Using YQL to Finance quotes</h2>
<?php
$BASE_URL = "https://query.yahooapis.com/v1/public/yql";
// Form YQL query and build URI to YQL Web service
$yql_query = "select * from yahoo.finance.quotes where symbol in ('YHOO', 'APPL')";
$yql_query_url = $BASE_URL . "?q=" . urlencode($yql_query) . "&env=store://datatables.org/alltableswithkeys&format=json";
@holydevil
holydevil / get-pnr-status.php
Created August 20, 2011 12:43
Get PNR status using Alagu's API
<?php
error_reporting(1);
//$url = "http://pnrapi.alagu.net/api/v1.0/pnr/6359817259?jsonp=parseJSON";
$url = "http://pnrapi.alagu.net/api/v1.0/pnr/6359817259";
$ch = curl_init($url);
//curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);