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 app = angular.module("mymapingapp", [ | |
"leaflet-directive" | |
]); | |
app.controller('MainCtrl', ['$scope', function($scope) { | |
// make map | |
angular.extend($scope, { | |
san_fran: { | |
lat: 37.78, | |
lng: -122.42, |
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 Node = function(value){ | |
var node = {}; | |
node.value = value; | |
node.next = null; | |
return node; | |
}; | |
var LinkedList = function(){ |
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
// Bandpage API | |
var BANDPAGE_APP_ID = '4945-------953728'; | |
var BANDPAGE_API_KEY = '5ae045d8e3-------92177c69'; | |
var BANDPAGE_API_SECRET = '055837ad8400---------058e7d1e3'; | |
var BANDPAGE_BASE = 'https://api-read.bandpage.com/'; | |
var request = require('request'); | |
var kelly_clarkson_bid = '12334995322703872'; |
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
// script to get "Popular tickets in SF Bay Area" from songkick | |
//====== | |
var fs = require('fs'); | |
var cheerio = require('cheerio'); | |
var webdriverio = require('webdriverio'); | |
var options = { desiredCapabilities: { browserName: 'chrome' } }; | |
var client = webdriverio.remote(options); | |
var outputPath = './results.json'; |
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 got = require('got'); | |
var cheerio = require('cheerio'); | |
var redditUrl = 'http://web.archive.org/web/20120216223019/http://www.reddit.com/r/science/'; | |
var nextUrl = 'https://web.archive.org/web/20030910064848/http://www.ed.gov/index.jhtml'; | |
got(redditUrl, function(err, html){ | |
var $ = cheerio.load(html); |
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
#!/bin/bash | |
laravel new $1 | |
cd $1 | |
composer install | |
yarn install | |
touch README.md | |
cp .env.example .env | |
git init | |
git add -A |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*" | |
} | |
] |
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
const randomBytes = require('crypto').randomBytes; | |
const AWS = require('aws-sdk'); | |
const ddb = new AWS.DynamoDB.DocumentClient(); | |
const fleet = [ | |
{ | |
Name: 'Bucephalus', | |
Color: 'Golden', |
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
<script> | |
var host = "YOURDOMAIN.github.io"; | |
if ((host == window.location.host) && (window.location.protocol != "https:")) | |
window.location.protocol = "https"; | |
</script> |
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
function linearSearch(array, toFind){ | |
for(let i = 0; i < array.length; i++){ | |
if(array[i] === toFind) return i; | |
} | |
return -1; | |
} |
OlderNewer