Skip to content

Instantly share code, notes, and snippets.

View desyncr's full-sized avatar

DC* desyncr

View GitHub Profile
@lgmoneda
lgmoneda / org-yank-link.el
Last active April 10, 2023 23:24
Copy Slack behavior of automatically creating link when pasting url with text selected
@jesstelford
jesstelford / 01-shape-up-to-kindle.md
Last active January 10, 2024 20:08
Read SHAPE UP by basecamp on a Kindle / reMarkable / eReader

Read Shape Up by basecamp on a kindle / reMarkable / eReader

Basecamp's new book Shape Up is now available online (https://basecamp.com/shapeup) to read page-by-page.

There is a .pdf version, but that's not the best format for Kindle / other eReaders. Instead, we can convert the page-by-page into an eReader friendly format.

Part 1: Convert to a single page

NOTE: This has only been tested on Chrome

@kleptog
kleptog / cnf_index.py
Created October 29, 2018 08:04
Python implementation for boolean expression index
# coding=utf8
# This is a python implementation of the boolean expression algorithm
# described in the paper "Indexing Boolean Expressions" by Whong et al.
# https://theory.stanford.edu/~sergei/papers/vldb09-indexing.pdf
# Note this really only uses the index ideas from the paper, because the
# ctual algorithm it describes involves shuffling through lists, something
# which is extremely difficult to do efficiently in python. I went for the
# easier route of simply counting entries. As such, I don't give any
@abstractart
abstractart / books.md
Last active June 18, 2024 16:10
Free Programming Ebooks - O'Reilly Media. Codeship free ebooks here - https://bit.ly/2oQ0knQ
@troyfontaine
troyfontaine / 1-setup.md
Last active July 19, 2024 15:08
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@danielrw7
danielrw7 / replify
Last active October 24, 2023 12:03
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "%s> " "$command"
@jsarenik
jsarenik / busyroot.sh
Last active October 29, 2019 17:33
chroot hack
#!/bin/sh
CHROOT=${1:-"myroot"}
ARCH=${2:-"armv5l"}
test -n "$UNSHARE" || {
export UNSHARE="unshare --fork --pid --mount"
exec $UNSHARE $0 $CHROOT
}
@gbuckingham89
gbuckingham89 / AuthServiceProvider.php
Last active August 22, 2022 12:01
Blog: Laravel Authentication Customer User Provider Demo
<?php
namespace App\Authentication;
use Auth;
use App\Authentication\UserProvider;
use Illuminate\Support\ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
@developerdino
developerdino / ThrottleRequests.php
Created February 16, 2016 04:12
Lumen Middleware for rate limiting - based on Laravel's implementation.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Response;
use Illuminate\Cache\RateLimiter;
class ThrottleRequests
{