Skip to content

Instantly share code, notes, and snippets.

View AntouanK's full-sized avatar

Antonios Karamitros AntouanK

View GitHub Profile
@AntouanK
AntouanK / sketch-never-ending.md
Created February 21, 2020 11:56 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@AntouanK
AntouanK / web-servers.md
Created January 18, 2020 14:05 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@AntouanK
AntouanK / gist:6b1077486b341cbdc5955d308471418d
Created November 19, 2019 08:22
dump a postgres db with pg_dump
docker run --rm -ti -v /tmp:/tmp postgres:alpine pg_dump -U postgres -h 123.45.67.89 -p 15432 -f /tmp/dump.sql -F t
@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