Skip to content

Instantly share code, notes, and snippets.

View oasido's full-sized avatar
🐳

Ofek Asido oasido

🐳
View GitHub Profile
@mlconnor
mlconnor / country_date_formats.csv
Created February 22, 2012 20:49
Listing of countries with their preferred date formats, ISO3166 code, ISO629-2
ISO 3166 Country Code ISO639-2 Country Code Country ISO 3166 Country Code ISO639-2 Lang Language Date Format
ALB AL Albania sqi sq Albanian yyyy-MM-dd
ARE AE United Arab Emirates ara ar Arabic dd/MM/yyyy
ARG AR Argentina spa es Spanish dd/MM/yyyy
AUS AU Australia eng en English d/MM/yyyy
AUT AT Austria deu de German dd.MM.yyyy
BEL BE Belgium fra fr French d/MM/yyyy
BEL BE Belgium nld nl Dutch d/MM/yyyy
BGR BG Bulgaria bul bg Bulgarian yyyy-M-d
BHR BH Bahrain ara ar Arabic dd/MM/yyyy
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 23, 2024 19:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jtdp
jtdp / gist:5443498
Last active May 23, 2024 16:23
Revert file permission changes in local git repository.. Very useful when you change permissions due to working on a samba share. Lifted from: http://stackoverflow.com/questions/2517339/git-how-to-recover-the-file-permissions-git-thinks-the-file-should-be
git diff -p \
| grep -E '^(diff|old mode|new mode)' \
| sed -e 's/^old/NEW/;s/^new/old/;s/^NEW/new/' \
| git apply
@Starefossen
Starefossen / tmux-cheats.md
Last active July 20, 2024 15:33
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
@mattbell87
mattbell87 / Capslock.md
Last active November 13, 2022 16:50
Removing the caps lock delay on Linux

How to remove the caps lock delay on Linux

Some people prefer to use the Caps Lock key in order to type capital letters, but on linux there's a delay when the button is pressed. Since there appears to be very few people who prefer to type this way the problem has never been fixed.

This is a short and sweet tutorial on how to fix that.

Open your terminal

In most distibutions you can do this by pressing the Win/Super key, type terminal and press Enter.

@hoandang
hoandang / php-docker-ext
Created May 20, 2017 01:12
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@jonlabelle
jonlabelle / npm_vs_yarn_command_translation_cheatsheet.md
Last active July 15, 2024 13:40
npm vs yarn command translation cheat sheet
@scmx
scmx / bash-prompt-git.md
Created May 9, 2018 12:32
Bash prompt with Git and autocompletion #bash #prompt #git #complete #autocomplete

Bash prompt with Git and autocompletion

First install HomeBrew and then use brew to install the bash-completion package

brew install bash-completion

After that you can open up your ~/.bashrc file and add the following:

# Load git prompt that display current branch etc
@bilsalak
bilsalak / exercise-loops-and-functions-part-1.go
Last active June 15, 2024 15:52
A Tour of Go - Exercise: Loops and Functions - Part 1
// As a way to play with functions and loops, let's implement a square root function: given a number x,
// we want to find the number z for which z² is most nearly x.
//
// Computers typically compute the square root of x using a loop. Starting with some guess z,
// we can adjust z based on how close z² is to x, producing a better guess:
//
// z -= (z*z - x) / (2*z)
// Repeating this adjustment makes the guess better and better until we reach an answer that is as close
// to the actual square root as can be.
//
@seanh
seanh / netrw.md
Last active April 23, 2024 18:13
Netrw Cheatsheet (Vim's Built-in Directory Browser)

Netrw Cheatsheet (Vim's File Browser)

See also:

  • vinegar.vim, which makes - open netrw in the directory of the current file, with the cursor on the current file (and pressing - again goes up a directory). Vinegar also hides a bunch of junk that's normally at the top of netrw windows, changes the default order of files, and hides files that match wildignore.

    With vinegar, . in netrw opens Vim's command line with the path to the file under the cursor at the end of the command. ! does the same but also prepends ! at the start of the command. y. copies the absolute path of the file under the cursor. ~ goes to your home dir. Ctrl+6 goes back to the file (buffer) that you had open before you opened netrw.

To launch netrw: