Skip to content

Instantly share code, notes, and snippets.

require 'aws-sdk'
require 'thread'
require 'pathname'
require 'logger'
class S3BulkUploader
attr_reader :thread_count,
:path,
:relative_path_from,
:region,
@mikechau
mikechau / find_association.sql
Created March 28, 2016 19:04
sql query for finding an association
SELECT column FROM table1 WHERE EXISTS (SELECT column2 FROM table2 WHERE table1.column1 = table2.column2.id);
@mikechau
mikechau / pt.sh
Last active February 27, 2016 18:47
pt steps
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.8
sudo apt-get install wine-mono4.5.6 wine-gecko2.40
sudo apt-get install unrar
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
winetricks d3dx9
  1. install xcode and accept license
  2. install brew - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. brew install wget
  4. brew install vim
  5. brew install git
  6. install nvm
  7. generate ssh keys
  8. brew install watchman
  9. brew install flow
SprocketsStatsWebpackPlugin.prototype.apply = function(compiler) {
var customStatsKey = this._customStatsKey;
var blacklistRegex = this._ignore;
var sprockets = {};
compiler.plugin('this-compilation', function(compilation) {
compilation.plugin('optimize-assets', function(assets, callback) {
Object.keys(assets).forEach(function(file) {
var asset;
var content;
/**
* Script based on @roman01la's webpack-sri.
*
* https://github.com/roman01la/webpack-sri
*
*/
'use strict';
var WebpackStats = require('webpack/lib/Stats');
ok: [127.0.0.1] => {
"var": {
"docker_started_containers": {
"ansible_facts": {
"docker_containers": [
{
"Id": "49d5004432161235d759d9b92866e9e7cb07e74d5a7f19219d1ba26d6bcdc7c1",
"Warnings": null
}
]
FROM williamyeh/ansible:ubuntu14.04
MAINTAINER mikechau
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d
COPY test_inventories/.insecure_keys/test_key.rsa.pub /home/root/.ssh/authorized_keys
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y openssh-server locales
RUN mkdir -p /var/run/sshd
/**
* jQuery plugin for Sortable
* @author RubaXa <[email protected]>
* @license MIT
*/
(function (factory) {
"use strict";
if (typeof define === "function" && define.amd) {
define(["jquery"], factory);