Skip to content

Instantly share code, notes, and snippets.

View drazik's full-sized avatar

Cyrille Perois drazik

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@GianlucaGuarini
GianlucaGuarini / post-merge
Last active August 22, 2023 20:54 — forked from sindresorhus/post-merge
Git hook that gets triggered after any 'git pull' whenever one of the files specified has changed. Useful to update any web application dependency using bower npm or composer
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by Gianluca Guarini
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -E --quiet "$1" && eval "$2"
}
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
http://code.hootsuite.com/css-at-hootsuite/
http://mikeaparicio.com/2014/08/10/css-at-groupon/
http://blog.trello.com/refining-the-way-we-structure-our-css-at-trello/
http://markdotto.com/2014/07/23/githubs-css/
http://codepen.io/chriscoyier/blog/codepens-css
http://ianfeather.co.uk/css-at-lonely-planet/
https://medium.com/@fat/mediums-css-is-actually-pretty-fucking-good-b8e2a6c78b06
http://blog.brianlovin.com/buffers-css/
http://dev.ghost.org/css-at-ghost/
@akella
akella / vertical-and-spread.sass
Last active December 6, 2018 20:59
Justify for inline-block, and vertical-align for inline-block
=justify
text-align: justify
line-height: 0
font-size: 0
text-justify: newspaper
zoom: 1
text-align-last: justify
&:after
content: ""
display: inline-block
@iamkirkbater
iamkirkbater / macros.forms.twig
Created April 5, 2016 15:00
Twig Macros for forms. Uses an array of attributes instead of 400 separate parameters for separate values. Also abstracts HTML5 text types for ease of reading in your template files.
{% macro input(name, value, type, attributes) %}
<input name="{{ name }}" type="{{ type }}" value="{{ value }}"{% for attr, value in attributes %} {{ attr }}="{{ value }}"{% endfor %}{% if not attributes.id is defined %} id="{{ name }}"{% endif %}/>
{% endmacro %}
{% macro text(name, value, attributes) %}
{% from _self import input %}
{{ input(name, value, "text", attributes) }}
{% endmacro %}
{% macro password(name, value, attributes) %}
@dmccombs
dmccombs / config.fish
Created April 28, 2016 00:59
A simple way to use the GNOME keyring for SSH key managment in fish shell
# Add this to the bottom of your config.fish file
# Set SSH to use Gnome keyring
set -gx SSH_AUTH_SOCK (gnome-keyring-daemon --start | grep "^SSH_AUTH_SOCK" | awk -F "=" '{print $2}')
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active July 24, 2024 06:15
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@ptbrowne
ptbrowne / rlink.sh
Last active January 21, 2020 09:09
Like yarn link but with rsync/nodemon
@necojackarc
necojackarc / Set up Vim with clipboard on Ubuntu on WSL2.md
Last active December 28, 2023 02:45
Set up Vim on Ubuntu on Windows Subsystem for Linux 2 (WSL2) to share clipboard

This explains how to set up Vim on Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2) in order to share the clipboard between Windows and Ubuntu.

Environments

  • Windows 10 Home
  • Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2)

Steps

  1. Build Vim with the clipboard option enabled
  2. Set up VcXsrv Windows X Server