testing
jekyll --server 8080 --auto
publishing
jekyll build
s3cmd sync _site/ s3://www.daeyunshin.com --add-header 'Cache-Control: max-age=300' --delete-removed --reduced-redundancy --acl-public --cf-invalidate
#!/usr/bin/python | |
class LongestPalindrome: | |
def longestPalindrome(self, string): | |
self.string = string | |
self.LP = {} | |
return self.longestPalindrome_(0, len(self.string) - 1) | |
def longestPalindrome_(self, i, j): | |
if (i, j) in self.LP: | |
return self.LP[(i, j)] |
#!/usr/bin/python | |
def lisBigger(prev, A): | |
if len(A) == 0: | |
return 0 | |
max = lisBigger(prev, A[1:]) | |
if A[0] > prev: | |
L = 1 + lisBigger(A[0], A[1:]) | |
if L > max: | |
max = L | |
return max |
# check if s is a subsquence of S | |
def checkSubsequence(s, S): | |
idx = 0 | |
for char in s: | |
if idx >= len(S): | |
return False | |
while char != S[idx]: | |
idx += 1 | |
if idx >= len(S): | |
return False |
testing
jekyll --server 8080 --auto
publishing
jekyll build
s3cmd sync _site/ s3://www.daeyunshin.com --add-header 'Cache-Control: max-age=300' --delete-removed --reduced-redundancy --acl-public --cf-invalidate
If you see this error when compiling a 32 bit x86 assembly code with the -m32
flag on a 64 bit environment, install gcc-multilib
.
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
#!/bin/bash | |
rand_highlight() { tr -dc $1 < /dev/urandom | head -c$2 | sed -e ''s/$3/`printf "\033[32m\033[40m$4\033[0m"`/g'';echo; }; rand_highlight shin 500 shin shin |