Skip to content

Instantly share code, notes, and snippets.

View cinoss's full-sized avatar

Đặng Tiến Cường cinoss

View GitHub Profile

Yu-Gi-Oh! Forbidden Memories - Battle Rank

Mix.install([
  {:kino, "~> 0.12.3"}
])

Keybase proof

I hereby claim:

  • I am cinoss on github.
  • I am cinoss (https://keybase.io/cinoss) on keybase.
  • I have a public key ASByfO6Vi8L_5o2l4aIKf8IgXNPxpGONLteRWw49wYh8xgo

To claim this, I am signing this object:

@cinoss
cinoss / add-atrpms-on-centos-6-and-install-ffmpeg.md
Last active May 20, 2016 04:56
How to Add ATrpms on CentOS 6/7 and Install FFmpeg 2.x in 3 Simple Steps

How to Add ATrpms on CentOS 6/7 and Install FFmpeg 2.x in 3 Simple Steps

atrpms is basically dead, yet we can still use its mirror to install stuffs by followings steps:

Create RPM-GPG-KEY.atrpms

mkdir /root/rpm # you can put it at any other place
vim /root/rpm/RPM-GPG-KEY.atrpms

This we can get by simply google the file name, some github repo with the key will show up.

https://docs.google.com/a/vng.com.vn/presentation/d/1Uy3KiVdKwHCibEKFOf-H3Us1q-_3saYi_6N0h1_t7aY/edit?usp=sharing
@cinoss
cinoss / remove_accents.py
Created April 6, 2016 15:01
Remove Vietnamese Accents - Xoá dấu tiếng việt in Python
s1 = u'ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚÝàáâãèéêìíòóôõùúýĂăĐđĨĩŨũƠơƯưẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặẸẹẺẻẼẽẾếỀềỂểỄễỆệỈỉỊịỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợỤụỦủỨứỪừỬửỮữỰựỲỳỴỵỶỷỸỹ'
s0 = u'AAAAEEEIIOOOOUUYaaaaeeeiioooouuyAaDdIiUuOoUuAaAaAaAaAaAaAaAaAaAaAaAaEeEeEeEeEeEeEeEeIiIiOoOoOoOoOoOoOoOoOoOoOoOoUuUuUuUuUuUuUuYyYyYyYy'
def remove_accents(input_str):
s = ''
print input_str.encode('utf-8')
for c in input_str:
if c in s1:
s += s0[s1.index(c)]
else:
s += c
@cinoss
cinoss / gist:2327292
Created April 7, 2012 10:30
python: new class
class ClassName(object):
"""docstring for ClassName"""
def __init__(self, arg):
super(ClassName, self).__init__()
self.arg = arg