Skip to content

Instantly share code, notes, and snippets.

View nmccready's full-sized avatar

nmccready nmccready

View GitHub Profile
angular.module('demo', [])
.provider('googleMaps', require('./google-maps-service-provider'))
.config(['googleMapsProvider', function(googleMapsProvider) {
googleMapsProvider.configure({
key: 'your api key',
language: 'de',
libraries: 'places'
});
}])
.controller('MapController', ['googleMaps', function(googleMaps) {
/*
* angular-ubilabs-geocomplete
* (c) 2014 Marko Zabreznik http://zabreznik.net
* License: MIT
*/
/*
* What is it: a simple factory that lazy loads google geo maps and ubilabs jquery.geocomplete.js
*
* You need: Angular, jQuery and Underscore
@FLYBYME
FLYBYME / gist:1659615
Created January 23, 2012 00:29
fs-pool
var fs = require('fs')
var events = require('events')
var util = require('util')
var path = require('path')
var FsPool = module.exports = function(dir) {
events.EventEmitter.call(this)
this.dir = dir;
this.files = [];
this.active = [];
<!-- File: app/views/layouts/application.html.erb -->
<%= yield %>
@nmccready
nmccready / start_locust
Created May 9, 2013 13:32
start script to kick off a master and then slaves via ssh across multiple machines
#!/bin/bash
#start script to kick off a master and then slaves via ssh across multiple machines
RUN_AS=${1:-$(whoami)}
SLAVE_CMD="nohup locust -f /opt/swarm//app1/some_locust_script.py --slave --master-host=testbox1.locust.com --host=http://someurlToHammer:9000 &>/dev/null &"
MASTER_CMD="nohup locust -f /opt/swarm/app1/some_locust_script.py --master --host=http://someurlToHammer:9000 &>/dev/null &"
start_instances()
{
@bunnymatic
bunnymatic / jasmine_json_fixtures.js
Created August 31, 2012 23:40
Jasmine Load JSON fixtures
/**
add ability to load json fixtures into jasmine
**/
var readJsonFixtures = function() {
return jasmine.getJsonFixtures().proxyCallTo_('read', arguments);
};
var preloadJsonFixtures = function() {
jasmine.getJsonFixtures().proxyCallTo_('preload', arguments);
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
@awatson1978
awatson1978 / gist:a0df5fef953b9da01ce1
Last active May 19, 2017 11:57
Publish an Atom Package
command-shift-P > Package > Package Generator: Generate Syntax Theme > mypackage
cd ~/.atom/packages/mypackage
apm login
apm develop mypackage
cd ~/github/mypackage
sudo chown -R username:wheel .
git commit -a -m 'checking everything in'
apm publish --tag v2.5.0 minor
@seb
seb / sample.conf
Last active December 12, 2017 09:01
Nginx + Puma + Rails + Cache Configuration File Replace example.com.
upstream example.com {
server unix:///var/www/example.com/shared/sockets/puma.sock fail_timeout=0;
}
server {
listen 80;
server_name *.example.com;
return 301 http://example.com$request_uri;
}