Skip to content

Instantly share code, notes, and snippets.

View benduran's full-sized avatar

Ben Duran benduran

View GitHub Profile
# 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 / .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 / .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
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 28, 2024 03:34
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

@hlecuanda
hlecuanda / Git-Squash-Implementation.md
Last active April 7, 2024 02:46
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"
@branneman
branneman / better-nodejs-require-paths.md
Last active July 30, 2024 01:03
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@jcraane
jcraane / logback.xml
Created July 3, 2013 18:26
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">