Skip to content

Instantly share code, notes, and snippets.

View auser's full-sized avatar

Ari auser

View GitHub Profile
angular.module('myApp', [])
.controller('AddController',
function($scope) {
$scope.cities = [{
"name": "Carson City, Nevada",
"region": "Nevada",
"country_code": "US"
},
{
"name": "Castle Rock, Colorado",
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'
<div id="menuExample"></div>
(setq backup-directory-alist `(("." . ,(concat user-emacs-directory
"backups"))))
(setq auto-save-default nil)
@auser
auser / App.js
Last active August 29, 2015 14:17
import React from 'react/addons';
import {RouteHandler,Navigation,Link, State} from 'react-router';
import {AuthenticationMixin} from '../mixins/authentication';
import {IntlMixin} from 'react-intl';
import SessionStore from '../stores/session_store';
import NavBarHeader from '../components/Navbar';
export default React.createClass({
var fs = require('fs');
var path = require('path');
var webpack = require('webpack');
var glob = require("glob");
var _ = require('lodash');
var cwd = process.cwd();
var version = require(path.resolve(cwd,'package.json')).version;
var makeConfig = function(opts) {
## That's one way...
# Think we can make this less ruby-specific?
solution :myapp do
cloud :db do
mysql :master => 1, :max_slaves => 4
end
cloud :web do
rails ...
solution :myapp do
cloud :db do
mysql :master => 1, :max_slaves => 4
end
cloud :web do
rails ...
nginx ...
end
pool :poolpartyrb do
plugin_directory "plugins"
cloud :app do
# Configuration
configure { :maximum_instances => 1,:keypair => "name" }
minimum_instances 1
apache do
class TextInputField extends React.Component {
constructor(props, state) {
super(props, state);
}
blur() {
setTimeout(() => this.refs.input.blur(), 0);
}
focus() {