Skip to content

Instantly share code, notes, and snippets.

@idcrook
idcrook / jenikns_ci_on_osx.md
Last active August 29, 2015 14:27 — forked from ostinelli/jenkins_ci_on_osx.md
Setup Jenkins CI on OSX.

Jenkins CI on OSX

Instructions on how to setup a secured Jenkins CI on a Mac.

Download & Install dependencies

All of these operations are done with your admin user.

Developer tools

Install the command line developer tools.

brew install java
brew install jenkins
brew pin jenkins

Create a hidden user for daemon

Keybase proof

I hereby claim:

  • I am idcrook on github.
  • I am idcrook (https://keybase.io/idcrook) on keybase.
  • I have a public key ASAiUjUO9xqm396RIfHRpXxgwTqytz2iPsAJtqT3f6sGAAo

To claim this, I am signing this object:

@idcrook
idcrook / tiny_i2c_lcd.ino
Last active March 9, 2018 17:19
Using I2C and ATtiny85 with Adafruit I2C / SPI LCD Backpack
/*
Demonstration sketch for Adafruit LCD backpack
using MCP23008 I2C expander
Uses the ATTiny 85 (replaces Trinket below)
The circuit:
* 5V to Arduino 5V pin
* GND to Arduino GND pin
* Display i2c backpack CLK to Trinket GPIO #2 (Arduino pin 2/attiny85 pin 7)
* Display i2c backpack DAT to Trinket GPIO #0 (Arduino pin 0/attiny85 pin 5)
@idcrook
idcrook / tiny_f_gen_16x2_LCD_char.ino
Created March 10, 2018 06:14
Code customized ATtiny85 PLL DDS (Direct Digital Synthesis) function generator and 16x2 LCD HD44780 with i2c backpack
/*
* Adapted by @idcrook for
* - Adafruit LCD 16x2 I2C/SPI Backpack
* - KY-040 Rotary Encoder with a switch
*
* Tiny Function Generator with Sine Wave
David Johnson-Davies - www.technoblogy.com - 7th March 2018
ATtiny85 @ 8 MHz (internal PLL; BOD disabled)
@idcrook
idcrook / magit-kill-buffers.el
Created June 13, 2018 16:12
Emacs magit-status kill associated buffers (instead of just burying)
;; based on http://manuel-uberti.github.io/emacs/2018/02/17/magit-bury-buffer/
;; had to deviate from it since:
;; 1. the post's key bind code did not work for me
;; 2. added late loading, otherwise magit-status-mode-map undefined
;; 3. 'q' was already bound by magit, so use 'Q' instead of rebinding
(defun idc-magit-kill-buffers ()
"Restore window configuration and kill all (of these) Magit buffers."
(interactive)
(let ((buffers (magit-mode-get-buffers)))
(magit-restore-window-configuration)
@idcrook
idcrook / bashrc_kubernetes_alias_completions.sh
Last active August 17, 2018 20:28
Shell command line expansion from kubernetes aliases; even complete in system namespace if bash alias uses that
# source kubectl bash completions
if hash kubectl 2>/dev/null; then
source <(kubectl completion bash)
fi
# the magic via https://github.com/cykerway/complete-alias
# seems to require BASH 4; install bash from Homebrew and make its BASH 4 the default user shell in macOS
# mkdir ~/.bash_completion.d
# curl -o ~/.bash_completion.d/bash_complete-alias.sh https://raw.githubusercontent.com/cykerway/complete-alias/master/completions/bash_completion.sh
if [ -f ~/.bash_completion.d/bash_complete-alias.sh ] ; then
# /etc/systemd/system/homebridge.service -*- systemd -*-
[Unit]
Description=Node.js HomeKit Server
After=syslog.target network-online.target
[Service]
Type=simple
User=homebridge
EnvironmentFile=/etc/default/homebridge
ExecStart=/usr/local/bin/homebridge $HOMEBRIDGE_OPTS
@idcrook
idcrook / lang-web.el
Created August 28, 2018 15:18
rsjx mode with attempt at auto-detecting JSX files
(use-package rjsx-mode
:mode "\\.jsx$"
:mode "components/.+\\.js$"
:init
;; auto-detect JSX file
;; https://github.com/shahinism/emacs.d/blob/master/configs.org
;; source: https://github.com/hlissner/.emacs.d/blob/master/modules/lang/javascript/config.el
(push (cons (lambda ()
(and buffer-file-name
(equal (file-name-extension buffer-file-name) "js")
@idcrook
idcrook / use-package_neotree.el
Last active September 18, 2018 18:15
neotree 26.1 display-line-numbers-mode
;; sidebar and dired in one
(use-package neotree
:bind
("<f8>" . neotree-toggle)
:config
;; needs package all-the-icons
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
;; Disable line-numbers minor mode for neotree
(add-hook 'neo-after-create-hook