Skip to content

Instantly share code, notes, and snippets.

View jlhg's full-sized avatar

Jian-Long Huang jlhg

View GitHub Profile
@mingfang
mingfang / convert id_rsa to pem
Last active July 20, 2024 14:14
Convert id_rsa to pem file
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
chmod 600 id_rsa.pem
@dannvix
dannvix / BypassPTTOver18.user.js
Last active November 13, 2017 01:07
自動跳過 PTT 的分級檢查 (請謹慎使用)
// ==UserScript==
// @name Bypass PTT Over-18 Checking
// @description 自動跳過 PTT 的分級檢查 (請謹慎使用)
// @namespace https://www.ptt.cc/bbs
// @author Shao-Chung Chen
// @license MIT (http://opensource.org/licenses/MIT)
// @version 1.1.0
// @include http://www.ptt.cc/*
// @include https://www.ptt.cc/*
//
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@mlanett
mlanett / rails http status codes
Last active September 21, 2024 18:10
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@wh1tney
wh1tney / deploy-static-site-heroku.md
Last active September 15, 2024 22:48
How to deploy a static website to Heroku

Gist

This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

Basic Assumptions

@ascendbruce
ascendbruce / equipment.md
Last active June 7, 2023 01:28
軟體工程師裝備建議

最後編輯 2020-11-01

列舉的種類基本上是生產力、健康相關,或是好用的工程師潮流精品(?)

這些是我偏好或想要的裝備,歡迎留言提供其他推薦裝備、發問為何要用或不用某個裝備、品牌。

免費的工具軟體雖然也很重要,但不在這邊討論,有興趣請查看 我的 Mac 環境設定

電腦周邊設備

@mitmul
mitmul / install_opencv2.4.8.sh
Last active April 27, 2018 18:29
install OpenCV 2.4.8 for CentOS 6.2
#! /bin/bash
sudo yum install -y gcc g++ gtk+-devel libjpeg-devel libtiff-devel jasper-devel libpng-devel zlib-devel cmake unzip
sudo yum install -y yum-priorities
wget http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum install -y eigen3-devel —enablerepo=epel
pip install numpy
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.8/opencv-2.4.8.zip
unzip opencv-2.4.8
@hwdsl2
hwdsl2 / .MOVED.md
Last active May 19, 2024 06:28
IPsec VPN Server Auto Setup Script for Ubuntu and Debian
@tlatsas
tlatsas / PKGBUILD
Created December 10, 2013 18:11
python 2.6.9 PKGBUILD
# Contributor: Chris McDonald <xwraithanx@gmail.com>
pkgname=python26
pkgver=2.6.9
pkgrel=1
_pybasever=2.6
pkgdesc="A high-level scripting language"
arch=('i686' 'x86_64')
license=('PSF')
url="http://www.python.org/"
anonymous
anonymous / loginPTT.py
Created November 20, 2013 18:23
自動登入PTT,再自動登出的程式
import telnetlib
import sys
import Account #My file. It contains Account.id, Account.password
import time
tn = telnetlib.Telnet('ptt.cc')
time.sleep(1)
content = tn.read_very_eager().decode('big5','ignore')
print("首頁顯示...")
if "請輸入代號" in content:
print("輸入帳號...")