Skip to content

Instantly share code, notes, and snippets.

View veelenga's full-sized avatar
🇺🇦
Annihilating code

Vitalii Elenhaupt veelenga

🇺🇦
Annihilating code
View GitHub Profile
(defun magit-status-parent ()
"Open the magit status of a parent git repository. Useful for
dealing with submodules. Suggest binding to SPC g p for Spacemacs.
(spacemacs/set-leader-keys \"gp\" 'magit-status-parent)
"
(interactive)
(let* ((child-directory (magit-toplevel default-directory))
(parent-directory (and child-directory
(magit-toplevel (file-name-directory
@pavloo
pavloo / btt-enable-disable.applescript.template
Last active May 16, 2019 15:42
A script to enable/disable certain keystrokes in BetterTouchTool when external keyboard connected/disconnected
tell application "BetterTouchTool"
activate
update_trigger "EAE52DEC-26DA-40DC-8BB1-62A102FE676C" json "{\"BTTEnabled\" : %d}"
update_trigger "7C3BC3BC-2B93-4674-8A5F-6697FDC6E723" json "{\"BTTEnabled\" : %d}"
end tell
<!doctype html>
<!-- This is just a very slightly modified tracking.js demo: https://trackingjs.com/examples/face_camera.html -->
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/tracking-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/data/face-min.js"></script>
<style>
video, canvas {
margin-left: 100px;
@straight-shoota
straight-shoota / install-crystal-nightly.sh
Last active May 5, 2020 21:39
install-crystal-nightly.sh
#! /usr/bin/env bash
#
# This script looks up the latest successfull nightly build of crystal on
# Circle CI, extracts the build number of `dist_artifacts` job and retrieves
# it's artifacts list.
#
# From this artifacts list, the specified tar package is downloaded and
# extracted in $INSTALL_DIR.
# The binaries `bin/crystal` and `bin/shards` are linked as `crystal-nightly`
# and `shards-nightly` in `/usr/local/bin`.
@shortjared
shortjared / list.txt
Last active May 6, 2024 17:16
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@LuisErnestoZamb
LuisErnestoZamb / 2017-11-29_15-08-33.jpg
Last active October 30, 2023 13:30
How setting up mysql as localhost and using this outside docker on Mac OS (accessing localhost mysql from docker) - The missing guide
2017-11-29_15-08-33.jpg
@hugoabonizio
hugoabonizio / program.cr
Last active November 10, 2017 12:06
This program breaks Crystal compiler
a = {1, 0}
b = {a, a}
c = {b, b}
d = {c, c}
e = {d, d}
f = {e, e}
g = {f, f}
h = {g, g}
i = {h, h}
j = {i, i}
@faustinoaq
faustinoaq / reload.md
Last active December 6, 2017 03:15
Guide to reload client on public file changes.

Amber Reload

Reloading public files on Amber.

Requisites

You need Crystal and Amber::CMD installed

Steps

@danthedaniel
danthedaniel / crystal_binary_size_comparison.md
Last active August 25, 2018 23:46
Comparison of Crystal and C binary sizes

Crystal Source Code:

def factorial(n)
    n < 2 ? 1 : n * factorial(n - 1)
end

if ARGV.size > 0
    n = ARGV.first.to_u64
 puts factorial(n)
@csswizardry
csswizardry / README.md
Last active April 2, 2024 20:17
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>