Skip to content

Instantly share code, notes, and snippets.

View benduran's full-sized avatar

Ben Duran benduran

View GitHub Profile
@benduran
benduran / gist:1d6fd9d2aef66b2a29416e49eb713065
Created January 2, 2018 16:19 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@benduran
benduran / logback.xml
Created September 24, 2018 18:37 — forked from jcraane/logback.xml
Sample logback.xml file with console and rolling file appender. The rollover is time based (daily) and size based, 5MB.
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>UTF-8</charset>
<Pattern>%d %-4relative [%thread] %-5level %logger{35} - %msg%n</Pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
@benduran
benduran / README-Template.md
Created August 19, 2019 19:36 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Keybase proof

I hereby claim:

  • I am benduran on github.
  • I am dr_dvran (https://keybase.io/dr_dvran) on keybase.
  • I have a public key ASDOJPBDUW9Wpci8RWB47KDNco3eHO8Ixyvqrih0UcFjdQo

To claim this, I am signing this object:

@benduran
benduran / .eslintrc.json
Created January 27, 2020 16:03
TypeScript & React-friendly ESlint configuration
{
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
@benduran
benduran / Git-Squash-Implementation.md
Created May 28, 2020 20:34 — forked from hlecuanda/Git-Squash-Implementation.md
Git Squash alias, from amazingly clean explanation on stackoverflow

From This other answer on the same thread

Based on Chris Johnsen's answer:

I added this line to the [alias] section of my git config file (~/.gitconfig):

squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
@benduran
benduran / .gitconfig
Created January 23, 2021 02:57
Configure git on Linux (Ubuntu) to use Meld as the merge and diff tool (also works on WSL if you have an xdesktop installed)
[merge]
tool = meld
[mergetool "meld"]
cmd = meld \"$LOCAL\" \"$MERGED\" \"$REMOTE\" --output \"$MERGED\"
path = "/usr/bin/meld"
[diff]
tool = meld
guitool = meld
prompt = false
[difftool "meld"]
@benduran
benduran / keycodes.json
Created March 8, 2021 19:17
JavaScript keycode mappings (includes Shift modifier)
{
"Keys": {
"Special": {
"NonMovement": {
"9": "Tab",
"13": "Enter",
"16": "Shift",
"17": "Control",
"18": "Alt",
"19": "Pause",
# Stolen from https://eplt.medium.com/5-minutes-to-install-imagemagick-with-heic-support-on-ubuntu-18-04-digitalocean-fe2d09dcef1
# Confirmed working on WSL2
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install build-essential autoconf libtool git-core
sudo apt-get build-dep imagemagick libmagickcore-dev libde265 libheif
cd /usr/src/
sudo git clone https://github.com/strukturag/libde265.git
sudo git clone https://github.com/strukturag/libheif.git
@benduran
benduran / .wslconfig
Created March 15, 2022 20:47
Sample WSL2 Config with Black Hole Discovery Enabled
[wsl2]
memory=8GB
swap=0
localhostForwarding=true
processors=8
# This enables black hole discovery on WSL boot
kernelCommandLine=net.ipv4.tcp_mtu_probing=2