This file contains 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
assets | |
business | |
accounts receivable | |
bank | |
personal | |
accounts receivable | |
bank | |
cash | |
gifts | |
online |
This file contains 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
# Example: Lazy.new(lambda { |id| API::HackerNews.item(id) }, 0) | |
class Lazy | |
attr_reader :value | |
def initialize(function:, value:) | |
@function = function | |
@value = value | |
@cached = nil | |
@is_cached = false |
This file contains 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
# frozen_string_literal: true | |
module Tesseract | |
module Transaction | |
module Steps | |
# Executes the step in a background job. Argument is either an ActiveJob | |
# or another Transaction (or anything that implements `#perform_later`. | |
# | |
# If the provided transaction implements a `validate` step, then that | |
# validator will be called on the input before the job is enqueued. This |
This file contains 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
interface = "lo1"; | |
host.hostname = "$name"; | |
ip4.addr = "172.16.0.$n"; | |
path = "/jail/run/$name"; | |
exec.prestart = "/sbin/zfs clone zroot/jail/template/10.2-RELEASE/root@10.2-RELEASE-p8 zroot/jail/run/$name && | |
/usr/sbin/sysrc -f /jail/run/$name/etc/rc.conf hostname=$name && | |
/usr/sbin/sysrc -f /jail/run/$name/etc/rc.conf sshd_enable=YES && | |
/usr/sbin/sysrc -f /jail/run/$name/etc/rc.conf sshd_flags=\"-o ListenAddress=172.16.0.$n\" && | |
/usr/sbin/pw -R /jail/run/$name useradd -n u01 -m -w random && | |
/usr/sbin/pw -R /jail/run/$name lock root && |
This file contains 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 python | |
import errno | |
import os | |
import subprocess | |
import sys | |
import shutil | |
import glob | |
import tarfile | |
import os.path |
This file contains 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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"log" | |
"os/exec" | |
) |
This file contains 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"net/http/cgi" | |
"os" | |
) | |
type Handler func(http.ResponseWriter, *http.Request) |
This file contains 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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
gem "benchmark-ips" | |
gem "rr" | |
gem "mocha" | |
gem "simple_mock" |
This file contains 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 -euo pipefail | |
IFS=$'\n\t' | |
DOMAIN="$1" | |
UUID=$(sudo virsh dumpxml $DOMAIN | grep uuid | cut -d">" -f2 | cut -d"<" -f1) | |
DISK_LOCATION=$(sudo virsh domblklist "$DOMAIN" | grep sda | tr -s " " | cut -d" " -f2-) | |
# Export Borg encryption key | |
export BORG_PASSPHRASE="<your key>" |
This file contains 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 'sunspot' | |
require 'sunspot/rails' | |
require 'feedjira/feed' | |
module Sunspot | |
module Feedjira::Feed | |
def self.included(base) | |
base.class_eval do | |
extend Sunspot::Rails::Searchable::ActsAsMethods | |
Sunspot::Adapters::DataAccessor.register(DataAccessor, base) |