$ 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
class Selector | |
def initialize(key) | |
@key = key | |
end | |
def selector_if | |
if @key == :success |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(0..10).each do |i| | |
"/Users/blah/#{i}.html" | |
end |
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:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
OlderNewer