Skip to content

Instantly share code, notes, and snippets.

View cold-logic's full-sized avatar

Christopher Davison cold-logic

View GitHub Profile
@hazcod
hazcod / wgcf.sh
Created October 16, 2019 06:10
Connect to Cloudflare Warp from macOS.
#!/usr/bin/env bash
set -euo pipefail
shopt -s inherit_errexit 2>/dev/null || true
# this script will connect macOS to Cloudflare Warp using Wireguard
# note: this is *absolutely not* an official client from Cloudflare
# Copyright (C) 2019 Jay Freeman (saurik)
# Zero Clause BSD license {{{
@zepptron
zepptron / gist:9635568b9d90d858daca7780feb8c4b7
Created June 19, 2018 08:34
.bashrc & .zshrc: usefull kubectl + fzf
podlog () {
local pod=($(kubectl get pods --all-namespaces -o wide | fzf | awk '{print $1, $2}'))
echo kubectl logs -n ${pod[1]} ${pod[2]}
kubectl logs -n ${pod[1]} ${pod[2]}
}
podexec () {
local pod=($(kubectl get pods --all-namespaces -o wide | fzf | awk '{print $1, $2}'))
local cmd=${@:-"/bin/sh"}
@Sinfrax
Sinfrax / gist:84dc312bd1ee20019f5e
Last active August 16, 2018 01:00
Toggle Messenger Sidebar Script
// ==UserScript==
// @name Toggle Messenger Sidebar
// @namespace http://jamesswandale.com/
// @version 0.1
// @description Button to hide messengers list of conversations
// @match https://www.messenger.com/*
// @copyright 2015+, James Swandale
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
@es
es / functional.js
Created December 8, 2013 20:55
Implementation of Curry, Uncurry, & Compose functions (with accompanying tests).
/*
* Curry takes a two argumented function and returns one func that returns a second func that each take one argument.
*/
function curry (func) {
return function (x) {
return function (y) {
return func (x, y);
};
};
@codeswimmer
codeswimmer / git_reset2head_recursive
Created November 18, 2011 19:11
git: recursively reset a git submodule hierarchy to HEAD
git submodule foreach git submodule init && git submodule update --recursive
@mayoff
mayoff / gist:1138816
Last active December 8, 2023 22:00
AppleScript to make Google Chrome open/reload a URL
(* To the extent possible under law, Rob Mayoff has waived all copyright and related or neighboring rights to “AppleScript to make Google Chrome open/reload a URL”. This work is published from: United States. https://creativecommons.org/publicdomain/zero/1.0/ *)
tell application "Google Chrome"
activate
set theUrl to "http://tycho.usno.navy.mil/cgi-bin/timer.pl"
if (count every window) = 0 then
make new window
end if
set found to false