Skip to content

Instantly share code, notes, and snippets.

View dokenzy's full-sized avatar
🏠
Working from home

dokenzy dokenzy

🏠
Working from home
View GitHub Profile
\newcommand{\supers}[1]{%윗첨자용
\raisebox{0.3em}{%
\textcolor{PantoneBlue2}{\tiny{\supergothic #1}}
}
}
\renewcommand{\thefigure}{\#\arabic{figure}}
\renewcommand{\figurename}{}
\newfixedcaption{\captionoffig}{figure}
\captionnamefont{\color{orange}\ttfamily\footnotesize}
\captiontitlefont{\color{gray}\sffamily\footnotesize}
\hangcaption
\captionstyle{\raggedright}
\precaption{\vspace{-3mm}}
\newenvironment{fillimg}[1]%
@dokenzy
dokenzy / toc.tex
Last active August 29, 2015 14:10
\AtBeginDocument{\renewcommand{\contentsname}{\texttt{\HUGE{\color{gray}{11월의 역사}}}}}
\renewcommand{\cftdot}{\raisebox{.5ex}{.}}
\cftpagenumbersoff{chapter}
\setcounter{tocdepth}{1}
\setcounter{secnumdepth}{1}
\renewcommand\cftsectionleader{\color{OysterGray}\cftdotfill{\cftsectiondotsep}}
\setlength\cftchapterindent{-3.8em}
\renewcommand{\cftchapterfont}{\normalfont\ttfamily\LARGE\color{PantoneBlue}}
\renewcommand\cftsectionpresnum{}
\renewcommand\cftsectionindent{1.6em}
@dokenzy
dokenzy / aes_example_in_python.py
Last active May 3, 2020 07:09
AES Encrytion Example in Python
#-*- coding: utf-8 -*-
# Python 3.4
# author: http://blog.dokenzy.com/
# date: 2015. 4. 8
# References
# http://www.imcore.net/encrypt-decrypt-aes256-c-objective-ios-iphone-ipad-php-java-android-perl-javascript/
# http://stackoverflow.com/questions/12562021/aes-decryption-padding-with-pkcs5-python
# http://stackoverflow.com/questions/12524994/encrypt-decrypt-using-pycrypto-aes-256
# -*- coding: utf-8 -*-
"""
Python: 3.4.2
author: dokenzy
date: 2015. 4. 21
license: MIT License
"""
import os
# 2015. 10. 08
@dokenzy
dokenzy / minipage_auto_width.tex
Last active February 22, 2016 15:36
minipage안에 한줄씩 들어가는 문자열 중에서 제일 긴 문자열을 minipage의 너비로 삼고자 할 때, LuaTeX을 이용해서 쉽게 하는 방법
\documentclass{article}
% http://blog.dokenzy.com/archives/2154
\usepackage{luacode}
\begin{luacode*}
texs = {'PDFLaTeX', 'XeTeX', 'LuaTeX'}
max = 0
for k, v in pairs(texs) do
if v:len() > max then
max = v:len()
end
@dokenzy
dokenzy / strike_latex.tex
Created March 6, 2016 07:24
latex에서 취소선 긋는 방법
\documentclass{article}
\usepackage{xcolor}
\usepackage{ulem}
\usepackage{soul}
\setstcolor{red}%%%
\usepackage{fontspec}
\usepackage{fontenc}
\usepackage{inconsolata}
\usepackage{erewhon}
@dokenzy
dokenzy / selenium-screenshotting.md
Created March 25, 2016 06:34 — forked from dannguyen/selenium-screenshotting.md
Using Selenium and Python to screenshot a javascript-heavy page

Using Selenium and Python to screenshot a javascript-heavy page

As websites become more JavaScript heavy, it's harder to automate things like screenshotting for archival purposes. I've seen examples and suggestions to use PhantomJS for visual testing/archiving of websites, but have run into issues such as the non-rendering of webfonts. I've never tried out Selenium until today...and while I'm not thinking about performance implications yet, Selenium seems far more accurate than PhantomJS...which makes sense since it actually opens a real browser. And it's not too hard to script to do complex interactions: here's an [example of how to log in to Twitter, write a tweet, upload an image, and send a tweet via Selenium and DOM element selection](https://gist.github.com/dannguyen/8a6fa49253c1d6a0eb92

@dokenzy
dokenzy / forkme.svg
Created March 27, 2016 07:49 — forked from jnothman/forkme.svg
"Fork me on GitHub" ribbon in LaTeX/TikZ vector graphic
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.