Skip to content

Instantly share code, notes, and snippets.

View FredrikWendt's full-sized avatar

Fredrik Wendt FredrikWendt

View GitHub Profile
@daveadams
daveadams / 01-vault-restore-poc.txt
Last active July 15, 2019 17:11
POC Vault Restore
To restore a filesystem-backed Vault instance:
1. Shut down running Vault process (pkill vault)
2. Make backup to new location (cp -r /original-storage /new-storage)
3. Write a new config file to point to /new-storage
4. Start new Vault process (vault server -config=new-config-file.hcl)
5. DO NOT run `vault init`
6. ONLY RUN `vault unseal <key1>`, etc...
@tinkerware
tinkerware / Vagrant provision block
Last active January 21, 2019 01:11
Install Latest Java 7 and Java 8 on Ubuntu 14.04 LTS
config.vm.provision "shell", inline: <<-SHELL
apt-get -y -q update
apt-get -y -q upgrade
apt-get -y -q install software-properties-common htop
add-apt-repository ppa:webupd8team/java
apt-get -y -q update
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
apt-get -y -q install oracle-java8-installer
apt-get -y -q install oracle-java7-installer
#!/bin/bash
JQPATH=$(which jq)
if [ "x$JQPATH" == "x" ]; then
echo "Couldn't find jq executable." 1>&2
exit 2
fi
set -eu
shopt -s nullglob
@Chaser324
Chaser324 / GitHub-Forking.md
Last active April 17, 2024 22:46
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@fredrik-corneliusson
fredrik-corneliusson / pimpa_gp_skolkarta.js
Created December 13, 2012 20:23
Ett litet Greasemonkey skript som utökar Göteborgs Postens skolkarta så att den visar betyg med färger på kartmarkörerna. Skriptet kan enkelt göras om till en bookmarklet mha: http://ted.mielczarek.org/code/mozilla/bookmarklet.html
// ==UserScript==
// @name Pimpa GP skolkarta
// @namespace squeed.skolor
// @include http://www.gp.se/nyheter/goteborg/goteborgsskolor/*
// @version 1
// ==/UserScript==
// Tip: To convert to bookmarklet use: http://ted.mielczarek.org/code/mozilla/bookmarklet.html
// and just paste the whole file content.
@igrigorik
igrigorik / file.html
Created July 6, 2012 08:01
Example of early head flush on load time
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Hello</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
Hello World
</body>
// HOWTO: load LABjs itself dynamically!
// inline this code in your page to load LABjs itself dynamically, if you're so inclined.
(function (global, oDOC, handler) {
var head = oDOC.head || oDOC.getElementsByTagName("head");
function LABjsLoaded() {
// do cool stuff with $LAB here
}