Skip to content

Instantly share code, notes, and snippets.

View abustamam's full-sized avatar

Rasheed Bustamam abustamam

View GitHub Profile
@abustamam
abustamam / gist:9116541
Created February 20, 2014 15:39
Postgresql failed to build on 10.9 Mavericks
$ brew doctor
Your system is ready to brew.
$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 8693ffbf25b5960aa5b9abcf2a0fda968cdce7a6
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
Cpu.prototype.move = function() {
var n;
if (game.moveNum === 0) {
// choose 1 as starting point
n = 1;
} else if (game.moveNum == 1){
// if player predicted 1 as first move
if (game.player1.moves[0] == "2") {
// predict 2 as player's next move
// ==UserScript==
// @name AutoTrimps
// @namespace https://github.com/zininzinin/AutoTrimps
// @version 2.1
// @description Automate all the trimps!
// @author zininzinin, spindrjr, Ishkaru
// @include *trimps.github.io*
// @include *kongregate.com/games/GreenSatellite/trimps
// @grant none
// ==/UserScript==
#!/usr/bin/env python
import argparse
import itertools
import logging
import os
import requests
import time
# Script config
CERTS_URL = 'https://review-api.udacity.com/api/v1/me/certifications.json'
# Script config
CERTS_URL = 'https://review-api.udacity.com/api/v1/me/certifications.json'
ASSIGN_URL = 'https://review-api.udacity.com/api/v1/projects/{pid}/submissions/assign.json'
REVIEW_URL = 'https://review.udacity.com/#!/submissions/{sid}'
ACCOUNT_SID = 'TWILIO SID'
AUTH_TOKEN = 'TWILIO AUTH TOKEN'
REQUESTS_PER_SECOND = 0.5 # Please leave this alone.
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
@abustamam
abustamam / script.js
Created August 6, 2016 21:39
Review for 201729
self.filteredList = ko.computed(function() {
if (self.currentAddress() === null) {
// no input, return the default list
return self.addressList();
} else {
// store the input value, without matching case
var filter = self.currentAddress().toLowerCase();
// you can find documentation on arrayFilter here:
// http://www.knockmeout.net/2011/04/utility-functions-in-knockoutjs.html
return ko.utils.arrayFilter(self.addressList(), function(addressItem) {
'use strict'
var geocoder, map;
//***** site map and marker ***************//
function getLongLat(address, callback) {
if (geocoder) {
geocoder.geocode({
'address': address
}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
// A class that holds the information for each marker on the map.
var MapLocation = function(newName, newLat, newLng, newInfo) {
// Save a reference to this.
var self = this;
// The name of the location.
this.name = newName
//set map, markers array, and locations information accessible in global scope
var map, infoWindow;
var markers = [];
var locations = [{
title: "Google Headquarter",
location: {
lat: 37.42204878,
lng: -122.08405316
},
streetAddress: "1600 Amphitheatre Pkwy",