Due to the high usage of this guide and the lack of comfort in Gist's commenting area, I decided to make a blog post out of this which you can find here:
http://blog.frd.mn/install-os-x-10-10-yosemite-in-virtualbox/
| default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
| default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
| default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
| # Gawk version | |
| # Remote | |
| grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}' | |
| # Local | |
| grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}' | |
| # No Gawk | |
| # Local | |
| grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ |
| # ---- Base Node ---- | |
| FROM ubuntu AS base | |
| # install the core dependencies | |
| RUN apt-get install -y my package list | |
| # set working directory | |
| WORKDIR /app | |
| # copy project file | |
| COPY Gemfile . | |
| COPY Gemfile.lock |
| resource "null_resource" "subnets" { | |
| triggers { | |
| subnets = "${var.private_subnets.us-west-2a},${var.private_subnets.us-west-2b},${var.private_subnets.us-west-2c}" | |
| } | |
| } | |
| resource "aws_elasticache_subnet_group" "elasticache" { | |
| name = "${var.name}-${var.envtag}" | |
| description = "${var.name} subnet group for ${var.envtag}" | |
| subnet_ids = [ "${compact("${split(",","${null_resource.subnets.triggers.subnets}")}")}" ] | |
| } |
| #! /usr/local/env python | |
| # coding: utf-8 | |
| import gzip | |
| import json | |
| from pprint import pprint | |
| import pandas as pd | |
| from pandas.io.json import json_normalize | |
| import sys | |
| import socket |
| # using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
| # more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
| http { | |
| lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
| lua_socket_pool_size 100; | |
| lua_socket_connect_timeout 10ms; | |
| lua_socket_read_timeout 10ms; | |
| server { |
| #!/usr/bin/env python | |
| from __future__ import print_function | |
| import requests | |
| import sys | |
| import json | |
| def hipchat_notify(token, room, message, color='yellow', notify=False, | |
| format='text', host='api.hipchat.com'): |
Due to the high usage of this guide and the lack of comfort in Gist's commenting area, I decided to make a blog post out of this which you can find here:
http://blog.frd.mn/install-os-x-10-10-yosemite-in-virtualbox/
| nginx/ | |
| !nginx/.gitkeep | |
| !nginx/logs/.gitkeep | |
| src/ | |
| tmp/ |
| #!/usr/bin/env python | |
| """ | |
| Not good, the thread doesn't stop... | |
| """ | |
| import sys | |
| import atexit | |
| from time import sleep |