Skip to content

Instantly share code, notes, and snippets.

View qct's full-sized avatar
🐛
Making bugs

qct

🐛
Making bugs
View GitHub Profile
@qct
qct / packCalldata
Created February 19, 2022 12:31 — forked from 0xmebius/packCalldata
object "Contract" {
code {
datacopy(0, dataoffset("runtime"), datasize("runtime"))
return(0, datasize("runtime"))
}
object "runtime" {
code {
if iszero(calledByOwner()) { revert(0, 0) }
switch selector()
case 0x00 {
@qct
qct / pyenv.md
Last active January 12, 2018 14:42 — forked from miminus/pyenv.md
为Mac 设置Python多版本开发环境

问题 - 可能会遇到多个版本同时部署的情况

  • 系统自带的Python是2.x,自己需要Python 3.x,测试尝鲜;
  • 系统是2.6.x,开发环境是2.7.x
  • 由于Mac机器系统保护的原因,默认的Python中无法对PIP一些包升级,需要组建新的Python环境
  • 此时需要在系统中安装多个Python,但又不能影响系统自带的Python,即需要实现Python的多版本共存。pyenv就是这样一个Python版本管理器

解决方法 - pyenv

@qct
qct / wget-jdk-oracle-install-example.txt
Last active April 20, 2016 06:13 — forked from sr75/wget-jdk-oracle-install-example.txt
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu