Skip to content

Instantly share code, notes, and snippets.

Chih-Hsuan Kuo kuoe0

Block or report user

Report or block kuoe0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kuoe0
kuoe0 / divisible-by-3-string.py
Created Dec 14, 2013
check integer divisible by 3 using string conversion
View divisible-by-3-string.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2013 KuoE0 <kuoe0.tw@gmail.com>
#
# Distributed under terms of the MIT license.
"""
@kuoe0
kuoe0 / divisible-by-3-division.py
Created Dec 14, 2013
check integer is divisible by 3 using division operation
View divisible-by-3-division.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2013 KuoE0 <kuoe0.tw@gmail.com>
#
# Distributed under terms of the MIT license.
"""
@kuoe0
kuoe0 / color_code.sh
Last active Sep 11, 2018
generate all combination of control code
View color_code.sh
#!/bin/bash
TEXT=" text "
RESET="\x1b[0m"
echo -n ' '
for i in `seq 0 7`; do
echo -n " 4${i}m "
done
View EFI_Snake.c
#include "efi.h"
#include "efilib.h"
#include "she.h"
#include <atk_libc.h>
#include <stdio.h>
#include <stdlib.h>
#include "Bmp.h"
#include "Hii.h"
View forecast.lsp
#!/usr/bin/env sbcl --script
;;; load quicklisp
(load "~/.quicklisp/setup.lisp")
;;; load package and redirect the loading msg to /dev/null
(with-open-file (*standard-output* "/dev/null" :direction
:output :if-exists :supersede)
(ql:quickload '("drakma" "com.informatimago.common-lisp.html-parser")))
;;; get html tag name
(defun html-tag (xml)
@kuoe0
kuoe0 / Install_OpenSSL_APT.sh
Created Sep 23, 2013
編譯採用 OpenSSL 的 APT,避免某些網路環境下發生 gnutls_handshake() failed 的情況!
View Install_OpenSSL_APT.sh
#!/usr/bin/env bash
# =============================================================================
# FileName: Install_OpenSSL_APT.sh
# Desc: Build APT with OpenSSL and Install it
# Environment: Ubuntu 13.04 amd64
# Usage: ./Install_OpenSSL_APT.sh
# Author: KuoE0 <kuoe0.tw@gmail.com>
# HomePage: http://kuoe0.tw/
# Copyright: BSD License (C) 2013 KuoE0
# =============================================================================
@kuoe0
kuoe0 / Install_OpenSSL_GIT.sh
Last active Sep 24, 2018
編譯採用 OpenSSL 的 git,避免某些網路環境下發生 gnutls_handshake() failed 的情況!
View Install_OpenSSL_GIT.sh
#!/usr/bin/env bash
# =============================================================================
# FileName: Install_OpenSSL_GIT.sh
# Desc: Build GIT with OpenSSL and Install it
# Environment: Ubuntu 13.04 amd64
# Usage: ./Install_OpenSSL_GIT.sh
# Author: KuoE0 <kuoe0.tw@gmail.com>
# HomePage: http://kuoe0.tw/
# Copyright: BSD License (C) 2013 KuoE0
# =============================================================================
View JK_to_move.js
<script type="text/javascript">
var interval = 25;
var myTimer;
var isTick = false;
var h = getDocHeight() * 0.6;
//console.log(h);
var count = 0;
View constant.py
# Put in const.py...:
class _const:
class ConstError(TypeError): pass
def __setattr__(self,name,value):
if self.__dict__.has_key(name):
raise self.ConstError, "Can't rebind const(%s)"%name
self.__dict__[name]=value
import sys
sys.modules[__name__]=_const()
View Install_OpenSSL_PyCurl.sh
#!/usr/bin/env bash
# =============================================================================
# FileName: Install_OpenSSL_PyCurl.sh
# Desc: Build PyCurl with OpenSSL and Install it
# Environment: Ubuntu 13.04 amd64
# Usage: ./Install_OpenSSL_PyCurl.sh
# Author: KuoE0 <kuoe0.tw@gmail.com>
# HomePage: http://kuoe0.tw/
# Copyright: BSD License (C) 2013 KuoE0
# =============================================================================
You can’t perform that action at this time.