Skip to content

Instantly share code, notes, and snippets.

View motyar's full-sized avatar
🟢
I may be slow to respond.

Motyar motyar

🟢
I may be slow to respond.
View GitHub Profile
@motyar
motyar / 1456800856.csv
Last active March 1, 2016 03:04 — forked from anonymous/1456800856.csv
Another gist
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.
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,
<!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>
4107632
@motyar
motyar / main.go
Last active November 13, 2015 21:09 — forked from maxmcd/main.go
Gitbaotest
package main
import (
"fmt"
"net/http"
"time"
)
func main() {
http.HandleFunc("/",
{
"Ok":12
}
s
@motyar
motyar / index.html
Created September 26, 2014 13:10
Redirect to new domain with only JavaScript
<!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");
<h1>Alert</h1>
<p>Bootstrap JS</p>
<div class="alert fade in">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p>
<div class="alert fade" ng-class="{in:alert}">
<button type="button" class="close" ng-click="alert=false">×</button>
@motyar
motyar / livestream
Created August 28, 2014 11:28 — forked from deandob/livestream
// Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream,
// Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback
var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance
// For live streaming, create a fragmented MP4 file with empty moov (no seeking possible).
var reqUrl = url.parse(req.url, true)
var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined;
if (cameraName) {
try {
cameraName = decodeURIComponent(cameraName);
@motyar
motyar / parsexml.html
Last active November 3, 2019 03:57
Parsing XML data with AngularJS
<!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>