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
# Unique headers | |
GNU "Terry Pratchett", Terry Pratchett | |
GNU #1 | |
GNU Aaron Swartz | |
GNU Aaron Swartz, Boris Floricic, Wau Holland, Stephen Hawking | |
GNU Arthur William Bell III, Natalie Nguyen, Terry Pratchett, Chris Long, Howard Gobioff | |
GNU Douglas Adams, Terry Pratchett, Lester Haines | |
GNU GNU: Terry Pratchett, Jon Postel, Dennis Ritchie, Evi Nemeth, Ray Tomlinson, Evelyn Berezin | |
GNU Jerry Jackowski, Natalie Nguyen | |
GNU John Dearheart |
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
| backup1 | RUNNING | 10.0.0.99 (eth0) | 2a02:8010:62f1:2:216:3eff:fe50:6cec (eth0) | PERSISTENT | 0 | | |
| | | 10.0.0.98 (eth0) | | | | | |
| | | 10.0.0.95 (eth0) | | | | | |
| | | 10.0.0.93 (eth0) | | | | | |
| | | 10.0.0.92 (eth0) | | | | | |
| | | 10.0.0.90 (eth0) | | | | | |
| | | 10.0.0.9 (eth0) | | | | | |
| | | 10.0.0.89 (eth0) | | | | | |
| | | 10.0.0.88 (eth0) | | | | | |
| | |
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
@things = [1] | |
def foo | |
@things.first | |
end | |
foo # => 1 | |
unless foo | |
foo = 2 |
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
module ToInt | |
def to_int | |
return unless self | |
i = to_i | |
i if self == i.to_s | |
end | |
end | |
String.include(ToInt) | |
NilClass.include(ToInt) |
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/ips" | |
Benchmark.ips do |r| | |
r.report("block argument, not yielded") do | |
m = Module.new do | |
def foo(&block) | |
end | |
module_function :foo | |
end |
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
# Content-Length, Worker index, Worker total count | |
length, index, count = ARGV.first(3).map(&method(:Integer)) | |
slice, remainder = length.divmod(count) | |
min = index * slice | |
max = if index == (count - 1) | |
# Final slice finishes on total size | |
length | |
else | |
# One less than next slice starting point | |
((index + 1) * slice) - 1 |
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
# On a mac | |
# Double check the README that these are still accurate instructions | |
git clone git://github.com/arekinath/piv-agent | |
cd piv-agent | |
make | |
# enter password when prompted | |
make install | |
# Stick the bit in your profile that it asks you to |
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
#!/usr/bin/env bash | |
exit 1 # don't run as a script y'idiot | |
# Bootstraps an ubuntu server on HP microserver to run lxd/terraform | |
# Expects to be run as root by hand. Copy/paste yo! | |
apt update | |
apt dist-upgrade -y |
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
root@mc1:~# time bonnie++ -d /tmp -r 512 -u root | |
Using uid:0, gid:0. | |
Writing a byte at a time...done | |
Writing intelligently...done | |
Rewriting...done | |
Reading a byte at a time...done | |
Reading intelligently...done | |
start 'em...done...done...done...done...done... | |
Create files in sequential order...done. | |
Stat files in sequential order...done. |
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
module FetchDup | |
def fetch(*) | |
super.dup | |
end | |
end | |
html_options = { | |
:class => "one", | |
} |