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 fs = require('fs') | |
const path = require('path') | |
const process = require('process') | |
const { spawnSync } = require('child_process') | |
const { GITHUB_TOKEN, GITHUB_USERNAME, GITHUB_EMAIL } = process.env | |
// leaving this without https:// in order to reuse it when adding the remote | |
const gitRepositoryURL = 'github.com/owner/repo-name.git' | |
const repositoryName = 'repo-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
/* | |
* An AngularJS Service for intelligently geocoding addresses using Google's API. Makes use of | |
* localStorage (via the ngStorage package) to avoid unnecessary trips to the server. Queries | |
* Google's API synchronously to avoid `google.maps.GeocoderStatus.OVER_QUERY_LIMIT`. | |
* | |
* @author: benmj | |
* @author: amir.valiani | |
* | |
* Original source: https://gist.github.com/benmj/6380466 | |
*/ |
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
// Let's initialize the primitives | |
var startTime, endTime, fileSize; | |
// Set up the AJAX to perform | |
var xhr = new XMLHttpRequest(); | |
// Rig the call-back... THE important part | |
xhr.onreadystatechange = function () { | |
// we only need to know when the request has completed |
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 test stemming for ElasticSearch. Working now!! | |
# Reference: http://stackoverflow.com/questions/4981001/why-elasticsearch-is-not-finding-my-term | |
require 'rubygems' | |
require 'net/http' | |
require 'yaml' | |
require 'json' | |
# kill the index | |
delete = Net::HTTP::Delete.new("/willindex") |
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
# (Re)create the index | |
curl -X DELETE "http://localhost:9200/tagcloud" | |
curl -X PUT "http://localhost:9200/tagcloud"-d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
} | |
} | |
}' |
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
ENV["WATCHR"] = "1" | |
system 'clear' | |
def growl(message) | |
growlnotify = `which growlnotify`.chomp | |
title = "Watchr Test Results" | |
puts message | |
image = message.match(/\s0\s(errors|failures)/) ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png" | |
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'" | |
system %(#{growlnotify} #{options} &) |