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
@data = {} | |
def default_src(*args) | |
if args.first | |
@data[:default_src] = args.map(&:to_s) | |
else | |
@data.delete(:default_src) | |
end | |
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
*@*.aaa | |
*@*.aarp | |
*@*.abarth | |
*@*.abb | |
*@*.abbott | |
*@*.abbvie | |
*@*.abc | |
*@*.able | |
*@*.abogado | |
*@*.abudhabi |
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
p = Enumerator.new { |y| o = (31..36).to_a-[34]; loop { y << o.first; o.shuffle! } } | |
c = ->(l) { "\e[1;5;#{p.next}m#{l}\e[0m" } | |
r = ->(s) { s.gsub(/\S/) { |l| c[l] } } | |
puts nil, "\t\e[34m<#{19479728.to_s(36)}>\e[0m#{r["#{[16712,8265].pack("s*")}#{ENV["USER"].upcase}"]}\e[34m</#{19479728.to_s(36)}>\e[0m", nil |
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
# What I expect it to be corrected to: | |
# | |
# something = begin | |
# raise "thing" | |
# rescue => e | |
# p e | |
# end | |
# What it's actually corrected to (standard gem v0.4.7) | |
something = begin |
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 GivenWhenThen | |
module ClassMethods | |
def def_Given(name, *args, &block) | |
_gwt_define(:Given, name, *args, &block) | |
end | |
def def_When(name, *args, &block) | |
_gwt_define(:When, name, *args, &block) | |
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
# To configure [email protected] on macOS under homebrew. | |
# Stick in /usr/local/etc/my.cnf.d/override.cnf | |
[mysqld] | |
# Only allow connections from localhost | |
bind-address = 127.0.0.1 | |
innodb_file_per_table = ON | |
innodb_flush_method=O_DIRECT | |
innodb_log_file_size=50M |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script src="https://unpkg.com/stimulus/dist/stimulus.umd.js"></script> | |
<script> | |
(() => { | |
const inactivityController = class extends Stimulus.Controller { | |
connect() { | |
this.timeoutInterval = parseInt(this.data.get("timeout")) | |
this.redirectDestination = this.data.get("destination") |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script src="https://unpkg.com/stimulus/dist/stimulus.umd.js"></script> | |
<script> | |
(() => { | |
const counterController = class extends Stimulus.Controller { | |
static get targets() { | |
return [ "count" ] | |
} |
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
apt update | |
apt full-upgrade -y | |
curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | bash | |
readonly optargs="$*" | |
cat >/etc/systemd/system/hab-sup.service <<EOF | |
[Unit] | |
Description=The Habitat Supervisor |
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
↳ caius$ deploy --demo --dry-run | |
🎉🎉 Deploying to demo.uk, demo.tx 🎉🎉 | |
⚛️ Checking deploy dependencies are installed | |
✅ dependencies fine | |
⚛️ Checking deploy can proceed | |
✅ proceeding | |
👍🏻 DRY RUN: Exiting now |