Skip to content

Instantly share code, notes, and snippets.

View seandong's full-sized avatar
🎯
Focusing

seandong seandong

🎯
Focusing
View GitHub Profile
@seandong
seandong / how_to_get_telegram_chat_id.md
Created April 20, 2024 23:55 — forked from nafiesl/how_to_get_telegram_chat_id.md
How to get Telegram Bot Chat ID

How to get Telegram Bot Chat ID

Create a Telegram Bot and get a Bot Token

  1. Open Telegram application then search for @BotFather
  2. Click Start
  3. Click Menu -> /newbot or type /newbot and hit Send
  4. Follow the instruction until we get message like so
    Done! Congratulations on your new bot. You will find it at t.me/new_bot.
    
@seandong
seandong / keybase.md
Created May 11, 2019 09:01
keybase.md

Keybase proof

I hereby claim:

  • I am seandong on github.
  • I am dongzhengxuan (https://keybase.io/dongzhengxuan) on keybase.
  • I have a public key ASDx7REGz2Th6a_5RgBoWVy-fECoEND2M-DrO_K_W41CXwo

To claim this, I am signing this object:

@seandong
seandong / travis-error.log
Created April 25, 2019 07:13
yarn install failed on xenial
```
g++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/home/travis/.node-gyp/12.0.0/include/node -I/home/travis/.node-gyp/12.0.0/src -I/home/travis/.node-gyp/12.0.0/deps/openssl/config -I/home/travis/.node-gyp/12.0.0/deps/openssl/openssl/include -I/home/travis/.node-gyp/12.0.0/deps/uv/include -I/home/travis/.node-gyp/12.0.0/deps/zlib -I/home/travis/.node-gyp/12.0.0/deps/v8/include -I../../nan -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -std=c++0x -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp
In file included from ../../nan/nan_converters.h:67:0,
from ../../nan/nan.h:222,

一.语言 1.推荐一本看过最好的python书籍? 拉开话题好扯淡 2.谈谈python的装饰器,迭代器,yield? 3.标准库线程安全的队列是哪一个?不安全的是哪一个?logging是线程安全的吗? 4.python适合的场景有哪些?当遇到计算密集型任务怎么办? 5.python高并发解决方案?我希望听到twisted->tornado->gevent,能扯到golang,erlang更好

二.操作系统 可以直接认为是linux,毕竟搞后端的多数是和linux打交道。 1.tcp/udp的区别?tcp粘包是怎么回事,如何处理?udp有粘包吗?

@seandong
seandong / zhiren_api_demo.py
Created December 11, 2018 11:20
zhiren API demo
#!/usr/bin/env python
# -*- coding: utf8 -*-
import hmac
import hashlib
import json
import time
import urllib
import requests
@seandong
seandong / gist:ac84b4ef28e4fc6070f06bb1e9c3eec6
Created September 11, 2018 02:20
zhiren sidekiq frozen worker log
> kill --ttin pid
2018-09-10T02:30:57.261Z 8172 TID-gpfysbf88 ProcessRunActionsJob JID-cbba7cd89adce6757179322a INFO: done: 0.04 sec
2018-09-10T02:31:19.493Z 8172 TID-gpfysbf88 ProcessRunActionsJob JID-9c4aee1741e26f0882f284f4 INFO: start
perform async process(1448067) actions -- false -- passed
2018-09-10T04:50:20.486Z 8172 TID-gpfwf6et8 WARN: Thread TID-gpfwf6et8
2018-09-10T04:50:20.487Z 8172 TID-gpfwf6et8 WARN: /www_space/zhirenhr/releases/20180909220036/vendor/bundle/ruby/2.4.0/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:151:in `backtrace'
/www_space/zhirenhr/releases/20180909220036/vendor/bundle/ruby/2.4.0/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:151:in `block in handle_signal'
/www_space/zhirenhr/releases/20180909220036/vendor/bundle/ruby/2.4.0/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:148:in `each'
/www_space/zhirenhr/releases/20180909220036/vendor/bundle/ruby/2.4.0/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:148:in `handle_signal'
@seandong
seandong / gist:37c0f5c2b0e0f5dcf922b6ca67ccf3dd
Created September 11, 2018 02:20
zhiren sidekiq frozen worker log
> kill --ttin pid
2018-09-10T02:30:57.261Z 8172 TID-gpfysbf88 ProcessRunActionsJob JID-cbba7cd89adce6757179322a INFO: done: 0.04 sec
2018-09-10T02:31:19.493Z 8172 TID-gpfysbf88 ProcessRunActionsJob JID-9c4aee1741e26f0882f284f4 INFO: start
perform async process(1448067) actions -- false -- passed
2018-09-10T04:50:20.486Z 8172 TID-gpfwf6et8 WARN: Thread TID-gpfwf6et8
2018-09-10T04:50:20.487Z 8172 TID-gpfwf6et8 WARN: /www_space/zhirenhr/releases/20180909220036/vendor/bundle/ruby/2.4.0/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:151:in `backtrace'
/www_space/zhirenhr/releases/20180909220036/vendor/bundle/ruby/2.4.0/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:151:in `block in handle_signal'
/www_space/zhirenhr/releases/20180909220036/vendor/bundle/ruby/2.4.0/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:148:in `each'
/www_space/zhirenhr/releases/20180909220036/vendor/bundle/ruby/2.4.0/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:148:in `handle_signal'
@seandong
seandong / wechat_robot.py
Created October 29, 2017 11:39 — forked from littlecodersh/main.py
Main script behind itchat robot
#coding=utf8
import itchat
# tuling plugin can be get here:
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling
from tuling import get_response
@itchat.msg_register('Text')
def text_reply(msg):
if u'作者' in msg['Text'] or u'主人' in msg['Text']:
return u'你可以在这里了解他:https://github.com/littlecodersh'
{
repository(owner: "facebook", name: "mention-bot") {
object(expression: "master") {
... on Commit {
blame(path: "cookieJar.js") {
ranges {
startingLine
endingLine
age
commit {
{
repository(owner: "facebook", name: "mention-bot") {
object(expression: "master") {
... on Commit {
blame(path: "cookieJar.js") {
ranges {
startingLine
endingLine
age
commit {