Skip to content

Instantly share code, notes, and snippets.

Avatar
💜
Building the Future of Social Media / Arming the Rebels

Zack Siri zacksiri

💜
Building the Future of Social Media / Arming the Rebels
View GitHub Profile
View setup-lxd-profile.sh
#!/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
View keybase.md

Keybase proof

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:

@zacksiri
zacksiri / _.md
Created Mar 13, 2016 — forked from PyYoshi/_.md
Set overcommit_memory=1 on CoreOS
View _.md
$ 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
View string_interpolation.rb
(0..10).each do |i|
"/Users/blah/#{i}.html"
end
View bank.ex
defmodule Bank do
use Application.Behaviour
# See http://elixir-lang.org/docs/stable/Application.Behaviour.html
# for more information on OTP Applications
def start(_type, _args) do
Bank.Supervisor.start_link
end
def start do
View selector.rb
require 'benchmark'
class Selector
def initialize(key)
@key = key
end
def selector_if
if @key == :success
View fizzbuzz.rb
require 'benchmark'
require 'pry'
class Fizzbuzz
def initialize(number)
@number = number
end
def self.count(number)
count = new(number)
@zacksiri
zacksiri / hello.coffee
Created Feb 5, 2014
CoffeeScript example
View hello.coffee
console.log "Hello World"
superheroes = ["superman", "thor", "batman"]
for hero in superheroes
console.log hero
person_1 =
name: "Zack"
email: 'zack@artellectual.com'
View Upstart.conf
<?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>
View app_name
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;
You can’t perform that action at this time.