Skip to content

Instantly share code, notes, and snippets.


Shahin Sorkh ShahinSorkh

View GitHub Profile
ShahinSorkh / adminer
Created Feb 15, 2021
run adminer:fastcgi using docker-compose
View adminer
cat <<EOF >/tmp/adminer.conf
server {
listen 80;
server_name localhost;
index index.php;
ShahinSorkh / regex.html
Last active Oct 6, 2020
Simple interactive regex test on browser
View regex.html
<!doctype html>
html { background-color: #2f3131; }
textarea {
display: block;
padding: 15px;
margin: 20px 10px;
ShahinSorkh / transcode.zsh
Last active Aug 9, 2020
transcode a given video to different bitrate versions using ffmpeg
View transcode.zsh
BT=$(ffprobe -i $INPUT 2>&1 | grep Video | grep -o -E '[[:digit:]]+ kb\/s' | cut -d' ' -f1)
while [[ "$BT" -gt '50' ]]
BT=$(printf "%0.f" $(( $BT * $FRACTION )))
View jnrowe-theme.zsh
# Copy of ohmyzsh/jnrowe-theme
# with issue fixed
autoload -U add-zsh-hook
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
zstyle ':vcs_info:*' formats '%F{2}%s%F{7}:%F{2}(%F{1}%b%F{2})%f '
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
View untrusted-lvl10-solution.js
* ambush.js *
* Oh. Oh, I see. This wasn't quite part of the plan.
* Looks like they won't let you take the Algorithm
* without a fight. You'll need to carefully weave your
* way through the guard drones.
ShahinSorkh / .php_cs
Last active Sep 17, 2020
php-cs-fixer config to follow laravel style guides
View .php_cs
$finder = PhpCsFixer\Finder::create()
ShahinSorkh /
Last active Jan 3, 2020
My custom proxy related configs
  • user.action -> privoxy

  • named.local -> bind

  • -> tor

Fast update

$ ./update
ShahinSorkh /
Last active Nov 21, 2020
Install latest docker-ce on debian and ubuntu

Install docker bash script

Installation script for docker-ce and docker-compose on debian, ubuntu and linux mint.

Note: Since has set sanctions on IPs from Iran, I need to use a proxy.

Official way

curl -fsSL -o

Use this command in zsh to enable auto indexing:

for d in **/*(/); do ln "$PWD/index.php" "$d"; done


php -S 4747