Skip to content

Instantly share code, notes, and snippets.

@Yggdrasil
Yggdrasil / config.h
Created Jun 24, 2021 — forked from muppetjones/config.h
QMK Dynamic Layer Lighting
View config.h
/* (Optional) Define RGB settings in your config.h */
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_ANIMATIONS
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
# define RGBLIGHT_LIMIT_VAL 150
# define RGBLIGHT_SLEEP
// # define RGBLIGHT_LAYERS // We do NOT need the layers!
#endif
@Yggdrasil
Yggdrasil / changeRemoteUrl.sh
Created Apr 24, 2019 — forked from samirreza/changeRemoteUrl.sh
Shell script to bulk change git remote url
View changeRemoteUrl.sh
directoryContainingAllRepos="" # directory containing all git repo's
oldGitRemoteServer="" # current remote server url for example gitlab.com
newGitRemoteServer="" # new remote server url for example git.example.com
cd $directoryContainingAllRepos
find * -maxdepth 0 -type d \( ! -name . \) -print | while read dir
do
cd $dir
if [ -d ".git" ]
then
remoteUrl1="$(git config --get remote.origin.url)"
@Yggdrasil
Yggdrasil / OpenWithSublimeText3.bat
Created Aug 16, 2017 — forked from cstewart90/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 10)
View OpenWithSublimeText3.bat
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@Yggdrasil
Yggdrasil / check_csr.sh
Created Jul 11, 2017 — forked from GeoffWilliams/check_csr.sh
policy based autosigning with puppet
View check_csr.sh
#!/bin/bash
# define the shared secret we will accept to authenticate identity
SHARED_SECRET="your the best"
# capture the certname (hostname) used for the request
CERT_NAME=$1
# feed STDIN (file descriptor 0) to the openssl command and pipe
# the output to grep to get the sharedSecret supplied by the agent
# capturing the value in a variable called AGENT_SECRET
View gist:1f1a139ea1b2e55b834761cf987fb80a
1. Create the KV config:
docker run traefik \
storeconfig \
--consul \
--consul.prefix="traefik" \
--consul.watch \
--consul.endpoint="CONSUL_IP:8500" \
--consulcatalog=true \
--consulcatalog.endpoint="CONSUL_IP:8500" \
@Yggdrasil
Yggdrasil / coreos-efs-cloud-config
Created Aug 3, 2016 — forked from kgorskowski/coreos-efs-cloud-config
coreos cloud-config file for dynamically mount aws efs in the right availability zone
View coreos-efs-cloud-config
#cloud-config
write-files:
- path: /etc/conf.d/nfs
permissions: '0644'
content: |
OPTS_RPC_MOUNTD=""
users:
- name: XYZ
groups:
@Yggdrasil
Yggdrasil / perf.js
Created Nov 1, 2015 — forked from tkadlec/perf.js
Super simple example of adding perf timing to the page display during dev work
View perf.js
(function () {
var perfBar = function(budget) {
window.onload = function() {
window.performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};
var timing = window.performance.timing,
now = new Date().getTime(),
output, loadTime;
View gist:4500802
#!/bin/bash
# Intial git svn clone:
# git svn clone --prefix=svn/ -A ~/.svn2git/authors -s https://svn.wxwidgets.org/svn/wx/wxWidgets wxWidgets
cd ~/svn-git-mirrors/wxWidgets;
if [ -f .sync-running-wxWidgets ]; then exit 1; fi;
touch .sync-running-wxWidgets
View NginX Hooks Location
location /hooks {
alias /srv/hooks/public;
passenger_enabled on;
}
View gist:1320706
VERSION="1.9.2"
PATCH="180"
DPKG_BUILD_ARCH="$(dpkg --print-architecture)"
set -e
DESTDIR="$(mktemp -d)"
debra create "$DESTDIR"
trap "debra destroy \"$DESTDIR\"" EXIT