Skip to content

Instantly share code, notes, and snippets.

@nnutter
nnutter / 00-cloud-config.yml
Created March 6, 2021 21:42 — forked from janeczku/00-cloud-config.yml
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@nnutter
nnutter / config.json
Created April 28, 2019 23:12
Whitespace+ Config
{
"mode": "all",
"autoStart": true,
"refreshRate": 100,
"elements":
[{
"name": "space",
"enabled": false,
"pattern": "\\s",
"style": {
@nnutter
nnutter / ssh.js
Last active May 2, 2018 18:39
Tomorrow Night for Chrome OS's Secure Shell (and Crosh Window)
// Based on the lilyterm config,
// https://github.com/chriskempson/tomorrow-theme/blob/0e0d35ac303f99b8aa182091ebeaee81cf2183a0/lilyterm/default.conf#L482-L497
// https://github.com/giraj/solarized-crosh
term_.prefs_.set('environment', { TERM: "xterm-256color" })
term_.prefs_.set('foreground-color', '#c5c8c6')
term_.prefs_.set('background-color', '#1d1f21')
term_.prefs_.set('cursor-color', '#aeafad')
term_.prefs_.set('color-palette-overrides',[
"#000000",
"#912226",
@nnutter
nnutter / 00-Git-HOME.md
Last active December 4, 2017 17:50
Workshop: Puppet Development with Vim

Use Git to manage $HOME

Caveats

  • Untracked files won't show up if hidden. To audit, temporarily re-enable with gh status --untracked-files=normal.
  • Have to convert submodule paths in .gitmodules to relative paths.

Setup

  1. Create a script called gh and put it in your PATH,

Keybase proof

I hereby claim:

  • I am nnutter on github.
  • I am nnutter (https://keybase.io/nnutter) on keybase.
  • I have a public key ASAtxpiRyQHdyzTW6eF5s7Sebsvvy5hz-nMFCFkSYLYoHgo

To claim this, I am signing this object:

@nnutter
nnutter / readme.md
Last active January 16, 2017 04:53
1Password Migration Notes
  • pass: a light GPG wrapper to store password as files (and version with Git).
  • Tool to conver 1Password .1pif into a pass store, 1password2pass. Doesn't work with my .1pif file; maybe because mine is an older version?
  • Android app for pass, Password Store.
  • Firefox extension for pass, PassFF.
@nnutter
nnutter / mocking.md
Last active October 13, 2016 21:36
Mocking

Test Doubles

[Others][mf_mocks] have defined four types of test doubles which are often colloqually referred to as mocking, mock objects, etc.

  • Dummy objects are passed around but never actually used. Usually they are just used to fill parameter lists.
  • Fake objects actually have working implementations, but usually take some shortcut which makes them not suitable for production (an in memory database is a good example).
  • Stubs provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test. Stubs may also record information about calls, such as an email gateway stub that remembers the messages it 'sent', or maybe only how many messages it 'sent'.
  • Mocks objects are pre-programmed with expectations which form a specification of the calls they are expected to receive.

Why use mocking?

diff --git a/pom.xml b/pom.xml
index 20c90d9..e496549 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,11 +22,11 @@ limitations under the License.
<groupId>com.googlesource.gerrit.plugins.singleusergroup</groupId>
<artifactId>singleusergroup</artifactId>
<packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
diff --git a/tools/maven/fake_pom.xml b/tools/maven/fake_pom.xml
index a531200..7388785 100644
--- a/tools/maven/fake_pom.xml
+++ b/tools/maven/fake_pom.xml
@@ -22,6 +22,10 @@
</build>
<pluginRepositories>
<pluginRepository>
+ <id>gerrit-maven</id>
+ <url>https://gerrit-maven.commondatastorage.googleapis.com</url>
diff --git a/github-oauth/pom.xml b/github-oauth/pom.xml
index f3acf76..3263ac3 100644
--- a/github-oauth/pom.xml
+++ b/github-oauth/pom.xml
@@ -65,7 +65,7 @@ limitations under the License.
<dependency>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-plugin-api</artifactId>
- <version>${project.version}</version>
+ <version>2.8</version>