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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script> | |
(function(){ | |
var url = window.location.href; | |
console.log(url.split('/')); | |
var newUrl = url.replace(url.split('/')[2],"newdomain.com"); |
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
s |
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
{ | |
"Ok":12 | |
} |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
) | |
func main() { | |
http.HandleFunc("/", |
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
4107632 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
<script type="text/javascript" src="https://raw.githubusercontent.com/abdmob/x2js/master/xml2json.min.js" charset="UTF-8"></script> | |
<meta charset="utf-8"> | |
<title>Parsing XML in ajgularJS</title> | |
</head> | |
<body ng-app="todosApp"> | |
<h2>Parsing XML data with AngularJS</h2> |
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 14 columns, instead of 10 in line 5.
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
Name,"Street Address",City,State,"Zip code",Phone,Website,Rating,Reviews,"Merchant Verified","Zagat Score",Lat,Lon,"Listing URL" | |
"Cesare Bistro","1126 Malvern Rd, Malvern VIC 3144, Australia",,Victoria,3144,"+61 3 9824 8126",,,,,,-37.8518021,145.0305495,https://maps.google.com/?cid=331980050335729601 | |
"The Feed Bag Cafe","1129 Malvern Rd, Malvern VIC 3144, Australia",,Victoria,3144,"+61 3 9822 2147",,,2,,,-37.8515806,145.0303308,https://maps.google.com/?cid=9348602243163246040 | |
"Ionsky's Bakehouse Cafe","1125 Malvern Rd, Malvern VIC 3144, Australia",,Victoria,3144,"+61 3 9822 1618",,,4,,,-37.851526,145.030218,https://maps.google.com/?cid=2678506672615980113 | |
"Coles Express Glenvern","Malvern Rd, Malvern VIC 3144, Australia",,Victoria,3144,"+61 3 9822 1481",http://www.colesexpress.com.au/,,1,,,-37.851869,145.02967,https://maps.google.com/?cid=11935115476390218234 | |
"The Malvern Hotel","Malvern Rd & Glenferrie Rd, Toorak VIC 3144, Australia",,Victoria,3144,"+61 3 9822 3582",http://www.themalvern.com/contact,,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
package main | |
import( | |
"flag" | |
"fmt" | |
"net/http" | |
"strings" | |
"io/ioutil" | |
"encoding/json" | |
"gopkg.in/mgo.v2/bson" |
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 | |
header('Content-Type: application/x-www-form-urlencoded'); | |
$entityBody = file_get_contents('php://input'); | |
echo $entityBody; | |
// DO things with Slack API + $entityBody HERE! | |
?> |
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 | |
// Set $apiVersion, $apiSecret, $redirectUrl, and $scope etc here. | |
if($_GET['logout']!=""){ | |
session_destroy(); | |
exit("Logged out"); | |
} | |
if($_GET['code']!=""){ | |
$accessData = json_decode(file_get_contents("https://graph.facebook.com/".$apiVersion."/oauth/access_token?client_id=".$appId."&redirect_uri=".$redirectUrl."&client_secret=".$appSecret."&code=".trim($_GET['code'])),true); | |
$userInfo = json_decode(file_get_contents("https://graph.facebook.com/v2.7/me?fields=email,id,name&access_token=".$accessData['access_token']),true); | |
$_SESSION['access'] = $userInfo; |