Skip to content

Instantly share code, notes, and snippets.

View mrdotb's full-sized avatar
🐙

mrdotb mrdotb

🐙
View GitHub Profile
@mrdotb
mrdotb / gist:da67fed8ee50cbcc3072d2ccb4cff8e5
Created February 17, 2018 13:02
create a bootable usb stick linux image on arch linux
# dep
sudo pacman -S dosfstools
# find the device
lsblk
# umount the key if mounted
sudo umount /dev/sdx
# format it
cqlsh -k panda -e "copy frames to '/tmp/frames_dump.csv';"
# add chunksize if your row are big
cqlsh -k panda -e "copy frames from '/tmp/frames_dump.csv' WITH chunksize = 1"
@mrdotb
mrdotb / gist:bf998d666f2c9d5ec84ce3fd7bbcc075
Created March 5, 2018 16:23
Create a sock5 proxy ubuntu
# Tested only on ubuntu 16.04
# The package in ppa is bugged
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
sudo apt-get install gdebi-core
sudo gdebi dante-server_1.4.1-1_amd64.deb
sudo adduser PROXYUSER
sudo passwd PROXYUSER
# type PROXYPASSWORD
@mrdotb
mrdotb / script.sh
Last active March 29, 2018 15:31
create ssh_config file from google compute engine project
gcloud config set project $PROJECT_ID
gcloud compute instances list --format json | jq -M '.[] | select(.status == "RUNNING") | "Host \(.name)\n hostname \(.networkInterfaces[0].accessConfigs[0].natIP)\n user $USER\n port $SSH_PORT\n"' | sed 's/\\n/\n/g' | sed 's/"//g' > ssh_config
# IPv6
##
## set default policies to let everything in
ip6tables --policy INPUT ACCEPT;
ip6tables --policy OUTPUT ACCEPT;
ip6tables --policy FORWARD ACCEPT;
##
## start fresh
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
hQIMAx0+vlvaav0UAQ/+PE4a4cn6TliVoZN7CXg4kT+xlSLOyo551LZln30aYMcD
SjAxqTqMnuLQBm16Yry/g7jyZM04im7F3RlsTOP/3LRszTPq4iQonfhdwoiYPj8a
m8/DUnLXEuao+9SQ6xchjKx89Bn6YDnLeDaojStIxgf9yieVhKTxeHHeuJ7JGcW/
mkusZuds159jbbjn5aE7ZrSe4s9yijaKO03veQHnMvaZfZc+W+43pGojdDRc4OLC
3BValcemGhf5Mf0F87nnMkTwJi8KqyrKtIF0LbL4JcakqyEyHeVzeMWQq9pg9qJj
Br9LTxR1Q6KdcljuLJQDseWMhFWAVclJPBfdnXbZ3XL+s+x/aa2JLooZuJFfB/k1
kAVwXsvlmGoa/FWr8pk12lW7fX76j+MOqhnHwQczw7FuffJetF7E8ntRlou1llfC
While 1
Sleep( Random(1, 2, 1) * 1000 * 60)
Send("{space down}");
Send("{space up}");
Sleep( Random(1, 2, 1) * 1000 )
Send("{/ down}")
Send("{/ up}")
var _0x5e6a = ["thumbnailsOpen", "isActive", "https://assets.lekiosk.com/filters:quality(50)/Public/Publications/", "/Images/mini", ".jpg", "pageTurnedDate", "updateCurrentPage", "$el", "open", "-100%", "none", "display", "flex", "watchCurrent", "querySelector", "#thumbnail_", "#reader_thumbnails_container", "offsetTop", "clientHeight", "clientWidth", "offsetLeft", "scrollLeft", "pageTurn", "isInternetExplorer", "doubleTapEnable", "navigateTime", "waitThumbnail", "isMouseDown", "startX", "startY", "scrollTop", "isDown", "mouseIsOnThumbnail", "onPinch", "hammerPosX", "hammerPosY", "hammerLastScale", "hammerLastPosX", "hammerLastPosY", "hammerMaxPosX", "hammerMaxPosY", "readerContentOriginX", "readerContentOriginY", "browserMinimumVersion", "12.1", "resize", "setSinglePage", "minHeight", "innerHeight", "setCanvasSize", "initPositionReaderContent", "children", "innerWidth", "floor", "displayPages", "getElementById", "tempLoading", "$route", "IssuePageRead", "improvment", "plus", "hammerSwipe", "hammer", "hammer
@mrdotb
mrdotb / gist:085492f99e3a77f547b0971e66f6f9a8
Created February 3, 2021 20:56
gettext password-validator and zxcvbn-elixir
## From zxcvbn-elixir
msgid "Add another word or two. Uncommon words are better."
msgstr ""
msgid "Straight rows of keys are easy to guess"
msgstr ""
msgid "Short keyboard patterns are easy to guess"
msgstr ""
@mrdotb
mrdotb / opening_hours.sql
Last active March 29, 2022 15:45
opening_hours
create table opening_hours
(
-- il est possible d'utiliser les horaires d'une boutique en particulier pour l'eshop
point_of_sale_id uuid REFERENCES point_of_sale (uuid), -- donc nullable
-- il est aussi possible pour l'eshop d'avoir ses propres horaires
terminal_eshop_id uuid REFERENCES terminal_eshops (uuid), -- donc nullable
day_of_the_week integer NOT NULL,
open time without time zone not NULL, -- est-ce qu'on a besoin de stocker la time zone ?
close time without time zone not NULL
);