YARD CHEATSHEET http://yardoc.org
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
#!/usr/bin/env ruby | |
hits = [] | |
checks = { | |
#'_spec\.rb$' => ['focus:[:space:]*true'], | |
'\.(rb|erb)$' => ['binding\.pry', 'debugger', 'byebug'] | |
} | |
# Find the names of all the filenames that have been (A)dded (C)opied or (M)odified | |
filenames = `git diff --cached --name-only --diff-filter=ACM`.split("\n") |
diff --git a/nixops/backends/__init__.py b/nixops/backends/__init__.py | |
index 86ed0f4..c52e9d3 100644 | |
--- a/nixops/backends/__init__.py | |
+++ b/nixops/backends/__init__.py | |
@@ -93,6 +93,17 @@ class MachineState(nixops.resources.ResourceState): | |
except nixops.ssh_util.SSHCommandFailed: | |
return None | |
+ def get_os_arch(self): | |
+ """Get the machine's OS archicture.""" |
#!/usr/bin/env python | |
# | |
# Adds the ability to add / modify tasks using a "blocks:" attribute, | |
# the opposite of "depends:". | |
# | |
# This script acts as an on-modify, on-add and on-launch hook at the same time. | |
# | |
### SETUP | |
# Save this file as | |
# ~/.task/hooks/on-modify.blocks_attr.py |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
require 'webrick' | |
require 'fileutils' | |
if ARGV.length != 0 | |
root = ARGV.first.gsub('\\', '/') | |
else | |
root = '.' | |
end | |
BACKUP_DIR = 'bak' |
# Full NixOS configuration for a ZFS server with full disk encryption hosted on Hetzner. | |
# See <https://mazzo.li/posts/hetzner-zfs.html> for more information. | |
{ config, pkgs, ... }: | |
let | |
# Deployment-specific parameters -- you need to fill these in where the ... are | |
hostName = "..."; | |
publicKey = "..."; | |
# From `ls -lh /dev/disk/by-id` |
This NixOS code ensures that the system provide version-specific $LOCALE_ARCHIVE
environment variables to mitigate the effects of
NixOS/nixpkgs#38991.
To deploy it, copy the file into your /etc/nixos
folder using a file name
like multi-glibc-locale-paths.nix
. Then edit your configuration.nix
file to
contain the attribute:
imports = [ ./multi-glibc-locale-paths.nix ];