Skip to content

Instantly share code, notes, and snippets.

View base698's full-sized avatar

Justin Thomas base698

View GitHub Profile
@kmott
kmott / 01-vault-gitlab-module.tf
Last active March 15, 2024 07:47
Terraform - JWT Auth for GitLab using Vault
//
// This enabled the JWT Auth backend in Vault for GitLab to authenticate with (obtains a Vault token based on $CI_JOB_JWT
// in pipeline jobs)
//
resource "vault_jwt_auth_backend" "gitlab" {
type = "jwt"
path = var.gitlab.jwt_auth_path
jwks_url = format("https://%s/-/jwks", var.gitlab.hostname)
bound_issuer = var.gitlab.hostname
}
@tomconte
tomconte / web3-solc-contract-compile-deploy.js
Created December 13, 2016 09:32
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
// Connect to local Ethereum node
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// Compile the source code
const input = fs.readFileSync('Token.sol');
const output = solc.compile(input.toString(), 1);
@emallson
emallson / nodejs-repl-eval.el
Created May 30, 2014 02:30
Evaluation functions for the `nodejs-repl' Emacs package.
;;; nodejs-repl-eval.el --- Summary
;;; Commentary:
;;;
;;; Evaluation functions for the `nodejs-repl' package. Written on a stormy
;;; night between days of node hacking.
;;;
;;; Code:
(require 'js2-mode)
(require 'nodejs-repl)
@puffnfresh
puffnfresh / hipchat.el
Created November 2, 2012 15:34
HipChat + jabber.el
;; Connect using jabber-connect
;; My username from the HipChat configuration
;; from https://www.hipchat.com/account/xmpp
(setq jabber-account-list '(("10804_81219@chat.hipchat.com")))
;; To join HipChat rooms easily
(defvar hipchat-number "10804")
(defvar hipchat-nickname "Brian McKenna")
(defun hipchat-join (room)
@rik0
rik0 / unfold-examples.clj
Created August 31, 2011 17:22
Unfold in Clojure
(ns unfold-examples
(:use [unfold-util]))
(defn unfold-tails [s]
(unfold empty? identity rest s))
(defn unfold-map [f s]
(unfold empty? #(f (first %)) rest s))