Skip to content

Instantly share code, notes, and snippets.


Daniele Salvagni daniele-salvagni

View GitHub Profile
circleous /
Last active Nov 22, 2017
gruvbox color schemes [ConEmu]
## This is where you want the entire toolchain to live
## You should run this script from within the destination directory, or
## redefine the BASE variable to fit your lifestyle.
echo []: Checking for system prerequisites
[[ $(which pacman) ]] && sudo pacman -S --needed gcc git make ncurses flex bison gperf python2-pyserial wget 2>/dev/null
[[ $(which apt-get) ]] && sudo apt-get install git make libncurses-dev flex bison gperf python python-serial wget 2>/dev/null
bpierre /
Last active Oct 11, 2021
Switch To Vim For Good

Switch To Vim For Good

NOTE: This guide has moved to

This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.

My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.

Original gist with comments:

kvnsmth /
Last active Mar 7, 2022
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add Vendor/AFNetworking

or something to that effect.

tmslnz /
Last active Aug 6, 2022
Setting up dnsmasq on OS X

Install dnsmasq

Via brew or other method

Set up DNS resolver order

In order to work on every connection and on any TLD, dnsmasq needs to be the first DNS resolver receving the query.

And since dnsmasq is a local process, all DNS queries need to go to

On macOS, /etc/resolv.conf is automaticaly created, depending on a variety of things (network settings, etc), so it cannot be edited.

namuol /
Last active Oct 4, 2022
rage-quit support for bash

rage-quit support for bash


Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

tarasowski /
Last active Oct 16, 2022
#Lambda - Async/Await Rules
  1. The function after await someFunc() need to return a promise. Otherwise it will not await and exit from the function. The function below will simply exit and won't wait till the background process is finished. Since async functions are waiting for Promises. The keyword await makes JavaScript wait until that promise settles and returns its result.
const hello4 = () => setTimeout(() => console.log('Hello from Hello4'), 5000)

const asycFunc = async() => {
	await hello4()
cmackenzie1 / docker-compose.yml
Last active Nov 22, 2022
Docker Compose for DynamoDB Local and Admin UI
View docker-compose.yml
version: '3.7'
image: amazon/dynamodb-local:latest
container_name: dynamodb-local
- "8000:8000"
image: aaronshaf/dynamodb-admin
jojobyte / ContextCmder-Disable.reg
Last active Dec 3, 2022
Cmder Context (Right-Click) Menu for Windows 7, 8, 10 & 11
View ContextCmder-Disable.reg
Windows Registry Editor Version 5.00

Nuclear Power

Nuclear Power is a major new feature introduced to Factorio in version 0.15. It requires higher level technology compared to either Solar Power or Steam Boiler Power, but it offers very high power output in exchange. It's a great solution for middle- to end-game power generation and it works well in combination with other power generation techniques.

This guide is written for people who want to know exactly how nuclear power works, but don't necessarily want all the solutions. It focuses on what you should do and what you should know to get Nuclear up and running, but doesn't tell you what to do or exactly how to solve the problems.

First Steps

Technology Required: Nuclear Power You can mine uranium ore sooner, but you'll need the Nuclear Power technology to do anything useful with it.