Skip to content

Instantly share code, notes, and snippets.

View AntouanK's full-sized avatar

Antonios Karamitros AntouanK

View GitHub Profile
@AntouanK
AntouanK / freeze resolv.conf
Created November 4, 2019 08:22
freeze resolv.conf
https://wiki.archlinux.org/index.php/NetworkManager#/etc/resolv.conf
sudo nvim /etc/NetworkManager/conf.d/dns.conf
```
[main]
dns=none
```
@AntouanK
AntouanK / blurlock
Created November 1, 2019 10:24
blurlock
#!/bin/bash
# /usr/bin/blurlock
image_file=/tmp/screen_lock.png
resolution=$(xdpyinfo | grep dimensions | awk '{print $2}')
filters='noise=alls=10,scale=iw*.05:-1,scale=iw*20:-1:flags=neighbor'
ffmpeg -y -loglevel 0 -s "$resolution" -f x11grab -i $DISPLAY -vframes 1 \
-vf "$filters" "$image_file"
i3lock -e -i "$image_file"

Keybase proof

I hereby claim:

  • I am antouank on github.
  • I am antouank (https://keybase.io/antouank) on keybase.
  • I have a public key whose fingerprint is 97C1 1362 FDA6 5121 AC5C 0F78 5F7D BAB1 6D99 471F

To claim this, I am signing this object:

@AntouanK
AntouanK / firstboot.sh
Created June 15, 2019 12:18
fedora wireguard boot script
#!/bin/bash
dnf copr enable -y jdoss/wireguard
dnf update
dnf distro-sync -y
dnf install -y wireguard-dkms
dnf install -y wireguard-tools
dnf install -y git
dnf install -y zsh
dnf install -y tmux
@AntouanK
AntouanK / tree.example
Created July 5, 2018 13:53
tree command
tree --prune -P something.elm
@AntouanK
AntouanK / cookies.hs
Created February 9, 2018 16:07 — forked from hdgarrood/cookies.hs
Scotty cookies example
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad (forM_)
import Data.Text.Lazy (Text)
import qualified Data.Text.Lazy as T
import qualified Data.Text.Lazy.Encoding as T
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Blaze.ByteString.Builder as B
@AntouanK
AntouanK / on-change.elm
Created January 21, 2018 18:08
onChange event handler for Elm
import Html exposing (Attribute)
import Json.Decode as Json
onChange : (String -> msg) -> Attribute msg
onChange handler =
on "change" <| Json.map handler <| Json.at ["target", "value"] Json.string
@AntouanK
AntouanK / docker-registry-start.sh
Last active April 15, 2019 20:14
docker registry script
#!/bin/bash
# # create auth first
#
# mkdir auth
# docker run \
# --entrypoint htpasswd \
# registry:2 -Bbn testuser testpassword > auth/htpasswd
@AntouanK
AntouanK / .extra-bashrc
Created January 19, 2018 07:58
extra bashrc
###################
# aliases
alias ls='ls --color -lahG'
# grep with color
alias grep='grep --color=auto'
# my ip
alias realip='curl curlmyip.com'
# git
alias gdevpull='git checkout develop && git pull'
alias gdelorphans='git branch -vv | grep '"': gone]'"' | awk '"'"'{print $1}'"'"' | xargs -n 1 git branch -d'
@AntouanK
AntouanK / get-parent-dir-path.sh
Created January 17, 2018 14:27
get directory path in bash script
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $DIR