Skip to content

Instantly share code, notes, and snippets.

View polonez's full-sized avatar
:octocat:
I ❤️chopin.

polonez polonez

:octocat:
I ❤️chopin.
View GitHub Profile
@polonez
polonez / add_margin_to_pdf.py
Created December 3, 2019 12:12
pdf add margin using pypdf2
from PyPDF2 import PdfFileReader, PdfFileWriter
from PyPDF2.pdf import PageObject
from tqdm import tqdm
def get_info(path):
with open(path, 'rb') as f:
p = PdfFileReader(f)
info = p.getDocumentInfo()
number_of_pages = p.getNumPages()
@polonez
polonez / kbs-classic-fm.sh
Created April 5, 2019 14:27
kbs-classic-fm on mpd, raspberry pi
set -x
# mpc clear
mpc add $(curl -s "http://onair.kbs.co.kr/index.html?sname=onair&stype=live&ch_code=24" | grep service_url | tail -1 | cut -d\" -f16 | cut -d\\ -f1)
#mpc play 1
mpc play $(mpc playlist | wc -l)

Keybase proof

I hereby claim:

  • I am polonez on github.
  • I am chopin (https://keybase.io/chopin) on keybase.
  • I have a public key ASCegc45A7XhDoGl-WQCMpE8z2L7o_bVj5XutBpg79hPOwo

To claim this, I am signing this object:

@polonez
polonez / puyopuyo.cc
Created April 12, 2018 14:46
puyopuyo (game)
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <conio.h>
#include <windows.h>
#define LOG_TAB -12
#define LEFT_KEY 17
#define UP_KEY 18
#define RIGHT_KEY 19