I hereby claim:
- I am zacksiri on github.
- I am zacksiri (https://keybase.io/zacksiri) on keybase.
- I have a public key ASACOtVJ7O9Ch49pmyCynvf8kuXFwJWh4z7cvd7xP0dRcAo
To claim this, I am signing this object:
#!/bin/bash | |
set -eu | |
_UID=$(id -u) | |
GID=$(id -g) | |
# give lxd permission to map your user/group id through | |
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root | |
# set up a separate key to make sure we can log in automatically via ssh | |
# with $HOME mounted |
I hereby claim:
To claim this, I am signing this object:
upstream unicorn { | |
server unix:/tmp/unicorn.app_name.sock fail_timeout=0; | |
} | |
server { | |
server_name domain.com www.domain.com; | |
listen 80 default deferred; | |
root /opt/apps/app_path/public; |
$ sudo -i
# vim /etc/systemd/system/overcommit_memory_1.service
# systemctl enable overcommit_memory_1
# systemctl start overcommit_memory_1
# systemctl status overcommit_memory_1
# cat /proc/sys/vm/overcommit_memory
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE busconfig PUBLIC | |
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | |
<busconfig> | |
<!-- Only the root user can own the Upstart name --> | |
<policy user="root"> | |
<allow own="com.ubuntu.Upstart" /> | |
</policy> |
upstream unicorn { | |
server unix:/tmp/unicorn.yoobook.sock fail_timeout=0; | |
} | |
server { | |
server_name domain.com www.domain.com; | |
listen 80 default deferred; | |
root /opt/apps/app_path/public; |
# Sample verbose configuration file for Unicorn (not Rack) | |
# | |
# This configuration file documents many features of Unicorn | |
# that may not be needed for some applications. See | |
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb | |
# for a much simpler configuration file. | |
# | |
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete | |
# documentation. |
#/etc/init/change_this_to_your_app_name.conf | |
description "App Name" | |
author "Admin Name <admin@app.com>" | |
start on virtual-filesystems | |
stop on runlevel [06] | |
env PATH=/usr/local/rbenv/shims:/usr/local/rbenv/bin:/usr/local/bin:/usr/bin:/bin | |
env RAILS_ENV=staging # what environment |
require 'benchmark' | |
require 'pry' | |
class Fizzbuzz | |
def initialize(number) | |
@number = number | |
end | |
def self.count(number) | |
count = new(number) |
require 'benchmark' | |
class AgeGroup < Struct.new(:categories) | |
# def | |
# Hash[*AGE_CATEGORIES.keys | |
# .map { |r| r.map { |v| | |
# [v, AGE_CATEGORIES.select | |
# { |k, val| | |
# k.include?(v) | |
# }.values.first] |