Skip to content

Instantly share code, notes, and snippets.

View node's full-sized avatar

Chris (Gentle) Y杨 node

View GitHub Profile
@node
node / gist:08fe7e45d6a2db77867de49bb06af838
Last active February 3, 2026 07:54
欢迎谜题猎人!Welcome puzzle hunter !
# 恭喜 Congratulation
恭喜你来终点,请以谜底最后一个单词为username,找到其GitHub的userId,发送到邮箱 1361877@gmai.com ,并在邮件中说明你的步骤和方法,提交内容合格者将会获得回复。
Congratulations on reaching the finish line. Please use the last word of the answer as username, find the userId of GitHub, and send it to the email address 1361877@gmai.com, and explain your steps and methods in the email. Those who submit qualified content will receive a reply.
---EOF---
@node
node / rustc-issue.md
Created January 25, 2022 03:54
手动执行 rustc 和 程序调用 rustc 的区别是什么?

手动编译

一切正常 rustc xx.rs ,编译后可执行文件也运行正常。

在某系统中通过程序调用 rustc

编译报错

"catalina-exec-35" daemon prio=10 tid=0x00007fdb08020800 nid=0x887a waiting on condition [0x00007fdabedeb000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007f0ca71c8> (a org.elasticsearch.common.util.concurrent.BaseFuture$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303)
at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:276)
at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:116)
@node
node / client2.c
Last active August 27, 2015 02:24 — forked from yongboy/client2.c
gcc -o client2 client2.c -levent; run:./client2 -h 192.168.190.180 -p 8000 -o 192.168.190.150,192.168.190.143,192.168.190.144,192.168.190.145,192.168.190.146,192.168.190.147,192.168.190.148,192.168.190.149,192.168.190.151,192.168.190.152
#include <sys/types.h>
#include <sys/time.h>
#include <sys/queue.h>
#include <stdlib.h>
#include <err.h>
#include <event.h>
#include <evhttp.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
@node
node / Similarity Measure
Last active December 15, 2015 19:20
Data
#!/usr/bin/env python
# ref. https://github.com/saimadhu-polamuri/DataAspirant_codes/blob/master/Similarity_measures/similaritymeasures.py
# ref. http://hi.baidu.com/uu_master/item/0b89469b42adef9bcd80e5e8
from math import*
from decimal import Decimal
class Similarity():
@node
node / 常用命令和操作
Last active January 4, 2016 18:29
DATABASE SQL NOSQL KEY-VALUE
全复制数据库
mysqldump -hlocalhost -uroot -ppasswpord database1_source --opt | mysql -hlocalhost -uroot -ppassword database2_desctination
@node
node / circos
Last active January 1, 2016 07:09
Data visualization
circos in D3.js
https://github.com/soundsuggest/example-d3js/tree/master/circos
circos.js
https://code.google.com/p/chaos-somanayr/source/browse/trunk/Circos/JavaScript/circos.js?r=22
@node
node / learn git in 15 minutes
Created December 24, 2013 01:55
SCM & Tools
参考 http://blog.jobbole.com/53573/
目录:
创建一个远程的空代码库(在BitBucket上或Github上)
在本地代码库添加一个项目
在分支上开发新功能
a) 保留新功能 或者 b) 丢弃它们
也许,回到某个早先的时间点
将本地代码库推送到远程代码库
server {
listen 80;
server_name ww.centos.bz;
rewrite ^(.*) https://$server_name$1 permanent;
}
@node
node / python-oauth2-client-by-rauth.py
Created September 21, 2012 02:04
Python Oauth2 Client Demo
from rauth.service import OAuth2Service
import urllib2
#config
app_key='tonr'
app_secret='secret'
authorize_url='http://127.0.0.1:8080/TestSSOauth/oauth/authorize'
access_token_url='http://127.0.0.1:8080/TestSSOauth/oauth/token'