Skip to content

Instantly share code, notes, and snippets.

@BTHUNTERCN
BTHUNTERCN / GNU_HASH
Created March 11, 2023 09:25 — forked from aakbar5/GNU_HASH
GNU_HASH
Yocto build was showing a warning of "QA Issue: No GNU_HASH in the elf binary".
- The fix was to make sure that linker command line used by the respective application is using parameters used by Yocto build system.
- Just for information $(LDFLAGS) used by Yocto is having -Wl,--hash-style=gnu.
Ref: For inside of GNU_HASH: https://blogs.oracle.com/ali/entry/gnu_hash_elf_sections
@BTHUNTERCN
BTHUNTERCN / encryption_service.rb
Created April 29, 2022 00:48 — forked from alexpacer/encryption_service.rb
智付通付款 payload 加密
require 'digest/sha2'
require 'base64'
require 'mcrypt' # 需要 php5-mcrypt libmcrypt-dev libmcrypt
class EncryptionService
prepend SimpleCommand # 可在 rails controller 簡單呼叫這個 library 的 plugin
def initialize(payload) # 將前台的動態資訊組好後丟進來
@payload = payload
end
@BTHUNTERCN
BTHUNTERCN / Easy try.ipynb
Created November 4, 2021 07:09 — forked from erikalien5595/Easy try.ipynb
Introduction to jupyter notebook.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BTHUNTERCN
BTHUNTERCN / installation.rst
Created July 2, 2021 08:04 — forked from uranusjr/installation.rst
在各作業系統上安裝 Python 3.4。

設定 Python 環境

開始使用 Pyhton 之前,首先要確定電腦上能不能執行 Pyhton 程式。本教學將需要 Python 3.4 或更高的版本,因此請確認電腦上是否有對應版本。若不確定電腦上是否已經安裝 Python,建議直接按照以下步驟設定,以保證教學中的程式皆能夠正常執行。由於各作業系統安裝流程不同,以下請按照作業系統,選擇自己需要的部份閱讀。

Windows

"""
python字符串切片处理DB2 DEL文件断行问题实现不以引号开头的行与上一行连接.py
题目来源 http://www.bathome.net/thread-38164-1-1.html
依山居 17:47 2015/11/24
这个解决思路在脑子里绕了好几天~找到\n也就是换行符,同时切出它的下一位不为"号的字符。
也就是不以引号开头行的第一个字。然后再替换掉\n
感觉这个处理方法,不需要正则表达式可靠性也很高。
"""
import time
start=time.time()
@BTHUNTERCN
BTHUNTERCN / 不就要這樣.rb
Created January 12, 2015 03:36
在 YouTube 上觀看「動力火車 莫忘初衷(英文版原曲)Lady Antebellum-Never alone」
https://www.youtube.com/watch?v=Nub1ChUHhnM&feature=youtube_gdata_player
@BTHUNTERCN
BTHUNTERCN / git.md
Last active August 29, 2015 14:13 — forked from suziewong/git.md

1.同一台电脑可以有2个git账号(不同网站的)

首先不同网站,当然可以使用同一个邮箱,比如我的github,gitlab,bitbucket的账号都是monkeysuzie[at]gmail.com 这时候不用担心密钥的问题,因为这些网站push pull 认证的唯一性的是邮箱 比如我的windows 上 2个账号一个gitlab 一个github (用的都是id_rsa)

host github
  hostname github.com
  Port 22

host gitlab.zjut.com

# ----------------------------------------------------------
# Configuration for hosting Git repositories with Apache 2.x
# ----------------------------------------------------------
#
# This setup provides "dual URLS", where URL like <http://git.example.com/my_repository.git>
# loads Gitweb in the browser and the same URL can be used in commands like `git clone` and `git remote add`.
# It was compiled from some sources on the internet and further customized/tuned.
#
# Please see documentation for:
#