Skip to content

Instantly share code, notes, and snippets.

View fourjuaneight's full-sized avatar
🤖

Juan Villela fourjuaneight

🤖
View GitHub Profile
@swyxio
swyxio / Gatsby-bootstrap-lifecycle.md
Last active April 1, 2022 11:19
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js) 1.5 load themes (swyx added this note July 2019)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c9
@mjul
mjul / docker-compose.yml
Created April 4, 2018 11:05
Elastic Search, Logstash and Kibana via docker-compose for parsing key=value style log files
version: '2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.2
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- "9200:9200"
@carloscabanero
carloscabanero / IBMPlexMono.css
Last active December 8, 2017 19:04
IBMPlex
@font-face {
font-family: "ibm-plex-mono";
font-style: normal;
font-weight: 400;
src: url(data:font/ttf;charset-utf-8;base64,AAEAAAASAQAABAAgRFNJRwAAAAEAAVsIAAAACEdERUYYthiZAAFNGAAAAIJHUE9TPbJ4ZQABTZwAAAToR1NVQt9ERhUAAVKEAAAIhE9TLzKH8WZmAAABqAAAAGBjbWFwrpljkQAADKQAAAieY3Z0IAJODk8AABhcAAAAPmZwZ20GWZw3AAAVRAAAAXNnYXNwABgAIQABTQgAAAAQZ2x5ZgFHeUYAAB3sAAETkGhlYWQLRWVwAAABLAAAADZoaGVhBYgC6QAAAWQAAAAkaG10eMlvp2QAAAIIAAAKnGxvY2Eav2EQAAAYnAAABVBtYXhwBN0DTwAAAYgAAAAgbmFtZS5FQhQAATF8AAAGWXBvc3TDi3HcAAE32AAAFTBwcmVw7506KgAAFrgAAAGiAAEAAAABAABGgo8CXw889QAJA+gAAAAA1VIehQAAAADVUgKh/vz/BQKIBF8AAAAJAAIAAAAAAAAAAQAABAH+7QAAAlj+/P78AogAAQAAAAAAAAAAAAAAAAAAAqcAAQAAAqcAywAiAGkABgABAAAAAAAKAAACAAIZAAMAAQADAlgBkAAFAAACigJYAAAASwKKAlgAAAFeADwBNQAAAgsFCQUAAAAAAKAAAG9QACB7AAAAAAAAAABJQk0gAEAAAPsCAwz/JAEsBAEBEyAAAZMAAAAAAgQCugAAACAAAwJYADIAAAAAAlgAAAJYAAACWABCAlgAPAJYAF8CWABUAlgAPAJYAEMCWABJAlgAQwJYADwCWABDAlgAYgJYAGoCWABdAlgAaQJYAFACWAA2AlgAYgJYAEICWABfAlgAPAJYAE0CWABDAlgAJwJYAFwCWABAAlgAHgJYAD0CWAA1AlgAVQJYAB8CWABYAlg
@Piasy
Piasy / install_ffmpeg.sh
Last active April 14, 2024 05:40
brew install ffmpeg with all options
brew options ffmpeg
brew install ffmpeg \
--with-chromaprint \
--with-fdk-aac \
--with-fontconfig \
--with-freetype \
--with-frei0r \
--with-game-music-emu \
--with-libass \
@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 3, 2024 08:18
Swift Concurrency Manifesto
@troyfontaine
troyfontaine / 1-setup.md
Last active May 3, 2024 10:52
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.

The Story of NPM and Yarn

In the beginning there was NPM, and for a time it was good. Packages went forth and multiplied. The New Gods proclaimed the great demon Dependency Management had been slain. But The Old Gods knew better, for they had seen much and knew that the demon can never be killed, only held at bay.

The Old Gods were ignored. In the folly of a young age grew an abundance of packages and with them grew the scourge of dependency. In the depths beneath the earth, in a place beyond memory, the great demon stirred.

The first sign something was wrong was non-deterministic package version mismatches. “This is fine!” The New Gods declared. “A temporary setback, nothing more! We can fix it.” And so they introduced shrinkwrap, a lamp to combat the growing darkness.

But it proved to be too little, too late, and dusk continued to fall. The New Gods suffered their first major defeat at the [Battle of Left-pad](https://www.theregister.co.uk/2016/03/23/npm_left_

// A clipping object is a JavaScript object that contains the following properties. Properties values may be null.
// title - String
// text - String
// url - String
// saveDate - Date
// Merge function receives an array of clipping objects and returns the merged string
function merge(clippings) {
var merged = clippings.reduce(function(string, clipping) {
@LoyEgor
LoyEgor / gulpfile.js
Last active March 13, 2023 17:22
best image compression settings (gulp-imagemin)
// install
// npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f
// node node_modules/jpegtran-bin/lib/install.js
// node node_modules/gifsicle/lib/install.js
// node node_modules/zopflipng-bin/lib/install.js
// node node_modules/mozjpeg/lib/install.js
// node node_modules/giflossy/lib/install.js
// node node_modules/pngquant-bin/lib/install.js