Skip to content

Instantly share code, notes, and snippets.

View romainl's full-sized avatar
💰
Alwayz Into Somethin'

Romain Lafourcade romainl

💰
Alwayz Into Somethin'
  • Razorfish France
  • Paris, France
View GitHub Profile
@lacygoill
lacygoill / CmdlineEnter_CmdlineLeave.md
Last active December 21, 2021 23:57
New events when you enter/leave a command line in Vim

In patch 8.0.1206, Vim has added 2 new events: CmdlineEnter and CmdlineLeave. They are fired every time you enter or leave a command line.

Syntax

There are 7 types of command lines, including one for normal Ex commands, debug mode commands, search commands (with a distinction between forward and backward), expressions, and inputs (more info at :h cmdwin-char). Each of them is associated with a symbol among this set : > / ? = @ -.

You can limit the effect of an autocmd listening to CmdlineEnter / CmdlineLeave to one or several types of command lines by:

@igemnace
igemnace / no-statusline-wednesdays.vim
Created September 5, 2017 09:36
No-statusline-wednesdays on #vim! Place in your ~/.vim/after/plugin directory for best results.
if system("date +%a") =~? "wed" | set laststatus=0 | endif
@stereokai
stereokai / index.css
Created June 18, 2017 11:03
Trigonometry in CSS
//----------------------------------*\
// TRIGONOMETRY FUNCTIONS
//----------------------------------*/
// # Trigonometry in CSS
//
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf
// - Useful if you don't want to use JS.
// - With CSS Variables.
// - `calc()` can't do power (x ^ y) so I used multiplication instead.
@cschiewek
cschiewek / x11_docker_mac.md
Last active April 25, 2024 19:35
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment:

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@felixSchl
felixSchl / run.sh
Last active November 15, 2016 16:46
Typescript 2 -> ES6 -> Babel -> ES5 (+ watchable / NO gulpfile! - just unix pipes) https://asciinema.org/a/20h1t61ky43xvszkrcl8h24jo
#!/bin/bash
#
# Task wrapper. Runs various chores in a cross platform manner.
#
# Usage: run [-h] <command>
#
# Available commands are:
# build: Build the project
# <other>: Run any other command available in the NPM path
#
@elerch
elerch / arch-usb-uefi.md
Last active January 26, 2024 22:20
Installation of Arch Linux on a USB stick with UEFI and legacy BIOS Support

Our goal here is to have one USB stick to rule them all. Objectives:

  • We want a full system - not a live CD
  • We want to boot this system on a Macbook Pro (requires UEFI)
  • We want to boot this system on a Acer C720 Chromebook (requires Legacy BIOS support)
  • We want the system "functional"

The last bullet is subject to interpretation, but I'm defining functional as:

  • X Windows works (with LXDE)
# Seems supported in $TERM_PROGRAM_VERSION 370
> cat nsterm-256color
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
xterm-256color|xterm with 256 colors and italic,
sitm=\E[3m, ritm=\E[23m,
use=xterm-256color,
> tic nsterm-256color
> ENV TERM=nsterm-256color tput sitm; echo italics
anonymous
anonymous / minimalist.vim
Created July 6, 2016 20:23
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "minimalist"
hi Normal cterm=NONE ctermbg=233 ctermfg=255
set background=dark