Skip to content

Instantly share code, notes, and snippets.

@ChoiZ
ChoiZ / keybase.md
Created July 1, 2020 17:39
keybase.md

Keybase proof

I hereby claim:

  • I am choiz on github.
  • I am choiz (https://keybase.io/choiz) on keybase.
  • I have a public key ASCN8WTF03HwRKF6j3AZxd1zBHJZXg4TOpKwzbflnUGhhAo

To claim this, I am signing this object:

@ChoiZ
ChoiZ / 81-thinkpad-dock.rules
Created November 1, 2017 10:26 — forked from seanf/81-thinkpad-dock.rules
Example ThinkPad docking script for multi-monitor
# Save this file (after modifying ID_VENDOR and ID_MODEL if necessary) as /etc/udev/rules.d/81-thinkpad-dock.rules
# These values seem to work for "ThinkPad Mini Dock Plus Series 3"
SUBSYSTEM=="usb", ACTION=="add|remove", ENV{ID_VENDOR}=="17ef", ENV{ID_MODEL}=="100a", RUN+="/etc/sbin/thinkpad-dock.sh"
@ChoiZ
ChoiZ / config.orange.txt
Created August 26, 2017 21:09
Remplacer sa livebox par un USG 3 d'Ubiquiti
firewall {
all-ping enable
broadcast-ping disable
ip-src-route disable
log-martians enable
name WAN_IN {
default-action drop
description "WAN to internal"
rule 10 {
action accept
# remove all docker in `docker ps -a`
docker rm `docker ps -a|tail -n+2|cut -d ' ' -f1`
# Delete all containers
docker rm -f $(docker ps -a -q)
# Delete all images
docker rmi -f $(docker images -q)
@ChoiZ
ChoiZ / gist:9aa5bd492ef61871fe5e
Created March 14, 2016 09:11 — forked from j3j5/gist:8b3e48ccad746b90a54a
Adyen Test Card Numbers
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
06/2016 OR 08/2018 737 7373
@ChoiZ
ChoiZ / commit-msg
Created January 21, 2016 14:20
git hooks commit-msg with prepend branch-name
#!/bin/bash
#
# .git/hooks/commit-msg
#
# Last modified 2016-01-21
# François LASSERRE <francois@monechelle.fr>
current_branch=`git rev-parse --abbrev-ref HEAD`
sed -i bak -e "1s/^/${current_branch} /" $1
@ChoiZ
ChoiZ / dualscreen.sh
Last active January 11, 2016 08:11
Dualscreen on Gentoo for Dell optiplex 3020
#!/bin/sh
# Add mode 1080p on Gentoo for Dell optiplex 3020
# to get the values use: gtf 1920 1080 60
# 1920x1080 @ 60hz
xrandr --newmode "1920" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -hsync +vsync
xrandr --addmode VGA1 1920
xrandr --output HDMI1 --off --output VIRTUAL1 --off --output DP1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --mode 1920 --pos 1920x0 --rotate normal
# on "xrandr: Configure crtc 0 failed" change to 50hz
# gtf 1920 1080 50
@ChoiZ
ChoiZ / tmux-cheatsheet.markdown
Created December 11, 2015 09:58 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ChoiZ
ChoiZ / git.md
Last active January 18, 2016 13:27
Usefull git commands

Usefull git commands

Add a specific commit to current branch:

git cherry-pick commit-hash

Merge commits

Merge the last 2 commits:

git rebase -i @~2

(old git version you must use HEAD instead of @) git rebase -i HEAD^2

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})