Skip to content

Instantly share code, notes, and snippets.

View onlurking's full-sized avatar
:shipit:
ship it

Diogo Felix onlurking

:shipit:
ship it
View GitHub Profile
# build stage
FROM node:12.16.1-alpine as build-stage
WORKDIR /app
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json package-lock.json* ./
RUN npm install
# Mouse support
set-option -g mouse on
set -g @scroll-speed-num-lines-per-scroll "1"
# make tmux display things in 256 colors
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# set scrollback history to 10000 (10k)
@onlurking
onlurking / programming-as-theory-building.md
Last active April 19, 2024 22:31
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@onlurking
onlurking / config
Last active January 31, 2020 15:26
# -*- mode: conf -*-
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set the Super key as Mod
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
server {
listen 9000 default_server;
server_name localhost;
location / {
root /var/www/html;
try_files $uri $uri/ /index.html;
}
}

ESLint (Airbnb), Prettier and Stylelint configuration

Add both eslint and prettier to your project:

npm install eslint prettier -D

Install and run the eslint-config-airbnb in your project:

@onlurking
onlurking / terminal-setup.md
Last active February 19, 2024 18:01
Configs for zsh, oh-my-zsh, zsh-autosuggestions, zsh-syntax-highlighting and FZF

Setup

Terminal

Instal oh-my-zsh with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Mouse support
set-option -g mouse on
set -g @scroll-speed-num-lines-per-scroll "1"
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 10000
@onlurking
onlurking / flexbox-emmet.md
Last active December 22, 2023 21:35
Flexbox Emmet Expansions

Flexbox Emmet Expansions

display

expansion: d:f, df:
display: flex;

flex-direction

expansion: fxd:r, fxdr:

{
"extends": "stylelint-config-recommended",
"plugins": [
"stylelint-order"
],
"rules": {
"at-rule-no-unknown": true,
"at-rule-no-vendor-prefix": true,
"block-opening-brace-space-before": "always-multi-line",
"color-hex-case": "lower",