Skip to content

Instantly share code, notes, and snippets.

View caius's full-sized avatar
👻

Caius Durling caius

👻
View GitHub Profile
@data = {}
def default_src(*args)
if args.first
@data[:default_src] = args.map(&:to_s)
else
@data.delete(:default_src)
end
end
*@*.aaa
*@*.aarp
*@*.abarth
*@*.abb
*@*.abbott
*@*.abbvie
*@*.abc
*@*.able
*@*.abogado
*@*.abudhabi
@caius
caius / file.rb
Created June 17, 2020 17:56
Run this in your terminal. No really, it's safe.
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
# 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
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
# 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
<!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")
<!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" ]
}
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
↳ 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