Skip to content

Instantly share code, notes, and snippets.

View tribela's full-sized avatar
😺
😼

Jeong Arm tribela

😺
😼
View GitHub Profile
@tribela
tribela / phone-scanner.py
Last active May 7, 2019 17:03
Phone scanner
#!/usr/bin/env python
import argparse
import time
import logging
import redis
import requests
import socket
import subprocess
from logging.handlers import RotatingFileHandler
@tribela
tribela / unshared.sh
Last active November 21, 2016 19:09
Unshared jail
#!/bin/bash
if [ "$1" != "_unshared_" ]; then
exec unshare -ruim "$0" _unshared_ "$@"
else
shift
fi
timeout=$1
tempdir=$(mktemp -d)
dirs_to_mount=({/bin,/lib,/lib64,/usr/{bin,lib,local}})
@tribela
tribela / imageterm.py
Last active November 22, 2016 17:50
Show image on 256-color term
#!/usr/bin/env python3
import io
import shutil
import sys
from urllib.request import urlopen
from PIL import Image
@tribela
tribela / fez.html
Created January 15, 2017 20:44
Fez characters
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Fez</title>
<style type="text/css">
body {
font-size: 80px;
}
@tribela
tribela / latest_musics.py
Last active September 21, 2019 16:07
Make latest musics playlist for MPD
#!/usr/bin/env python3
from collections import namedtuple
from datetime import timedelta
import functools
import os
from os import path
import sys
import time

Keybase proof

I hereby claim:

  • I am kjwon15 on github.
  • I am kjwon15 (https://keybase.io/kjwon15) on keybase.
  • I have a public key ASBSamu1MoW7c4KdRIKSwKA9-_lgUHedtbKBBsQ8JGlreQo

To claim this, I am signing this object:

@tribela
tribela / search.py
Created February 18, 2018 18:38
naver cafe search
import sys
import requests
from pyquery import PyQuery
def get_content(link):
resp = requests.get(
link,
@tribela
tribela / pre-receive
Last active May 21, 2019 23:51
Git push to deploy
#!/bin/bash
set -eo pipefail
TARGET_BRANCH=master
GIT_DIR="$(git worktree list | head -n1 | cut -d' ' -f1)"
APPNAME="${GIT_DIR##*/}"
build_app() {
@tribela
tribela / whois-kisa.user.js
Last active May 26, 2018 15:26
whois.kisa.or.kr unlock drag
// ==UserScript==
// @name whois drag
// @namespace https://github.com/Kjwon15/whois-drag
// @version 0.1
// @description Fuck Whois.or.kr
// @author Kjwon15
// @match https://xn--c79as89aj0e29b77z.xn--3e0b707e/*/whois.jsc*
// @grant none
// ==/UserScript==
@tribela
tribela / fix_acc_duplicated.py
Last active October 5, 2018 17:29
[Mastodon] Force redownload missing remote media
import glob
import os
from os import path
import psycopg2
DATA_DIR = '[MEDIA_PATH]/accounts'
URL = '[DATABASE_URI]'