Skip to content

Instantly share code, notes, and snippets.

View susemeee's full-sized avatar

Suho Lee susemeee

View GitHub Profile
@susemeee
susemeee / pykakao.py
Created April 29, 2014 15:35
pykakao-modified
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
pykakao
=======
pykakao is a very simple kakaotalk LOCO/HTTP API protocol wrapper for python.
Installation
# -*- coding: utf-8 -*-
import sys
try:
if sys.argv[1] == "--auth":
from lib.pykakao.pykakao import kakaotalk
# first time authentication
try:
email = sys.argv[2]
from subprocess import Popen, PIPE
import sys
import argparse
key = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"
parser = argparse.ArgumentParser()
parser.add_argument('--dest', dest='pass_to_program', action='store', default=False,
help='program destination')
parser.add_argument('--max', dest='max_length', action='store', type=int, default=3,
@susemeee
susemeee / Swiftbug
Last active August 29, 2015 14:06
Segmentation fault bug in Swift language
//
// ViewController.swift
// SwiftBug
//
// Created by *守細美 on 9/25/14.
// Copyright (c) 2014 iplab. All rights reserved.
//
import UIKit
@susemeee
susemeee / random_h.php
Last active February 27, 2016 08:24
P for predictable
<?php
mb_internal_encoding("UTF-8");
// Generate CAPTCHA code if not set by user
$characters = "가나다라마바사아자차카타파하갸냐댜랴먀뱌샤야쟈챠캬탸퍄햐거너더러머버서어저처커터퍼허겨녀뎌려며벼셔여져쳐켜텨펴혀고노도로모보소오조초코토포호교뇨됴료묘뵤쇼요죠쵸쿄툐표효구누두루무부수우주추쿠투푸후규뉴듀류뮤뷰슈유쥬츄큐튜퓨휴그느드르므브스으즈츠크트프흐기니디리미비시이지치키티피히";
srand(time(0));
$captcha = '';
$length = 5;
while( mb_strlen($captcha) < $length ) {
$captcha .= mb_substr($characters, rand() % (mb_strlen($characters)), 1);
"""Converts image to IMAGE_SIZExIMAGE_SIZE slack emoji array"""
import sys
import numpy
from PIL import Image
EMOJI_MAP = [
# enter custom emoji map here (dark one first)
# ':desktop_computer:',
@susemeee
susemeee / angularjs-korean-input.js
Last active December 27, 2017 05:12
Enhancement of handling a data binding of angular.js (related to Korean IME composition event)
// angular.module('YOUR_APP').directive('koreanInput', KoreanInputDirective);
// SEE: https://github.com/angular/angular.js/issues/13617
export default function KoreanInputDirective () {
return {
restrict: 'A',
link: {
post: function (scope, element, attrs) {
element.on('compositionupdate', function (e) {
element.triggerHandler('compositionend');
@susemeee
susemeee / check-corporation-number.js
Last active September 12, 2018 01:28
법인등록번호 검증하기
// 법인번호 오류검증 공식
// 법인번호에서 마지막 자리를 제외한
// 앞에 모든 자리수를 1과 2를 순차적으로 곱한다.
// 예) 1234567890123
// ************
// 121212121212
// 각각 곱한 수를 모든 더하고 10으로 나눈 나머지 수를 구한다.
// (각각더한수 % 10)
// 나눈 나머지 수와 법인번호 마지막 번호가 일치하면 검증일치
function isValidCorporationId(value = '') {
@susemeee
susemeee / compile-ffmpeg-nvenc.sh
Created April 20, 2020 01:03
FFmpeg + nvenc + libsrt
#!/bin/bash
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu.
#See the prefix path and compile options if edits are needed to suit your needs.
#install required things from apt
installLibs(){
echo "Installing prerequisites"
sudo apt-get update
sudo apt-get -y --force-yes install nettle-dev cmake tcl autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \
@susemeee
susemeee / hacker-ip.txt
Last active June 5, 2020 11:34
WordPress Hacker's IP address list
103.10.171.21
103.120.226.54
103.136.43.65
103.233.83.220
103.233.83.251
103.86.176.107
103.9.76.178
104.143.43.10
104.160.43.209
104.244.153.22