start new:
tmux
start new with session name:
tmux new -s myname
| import re | |
| from hashlib import md5 | |
| def gfm(text): | |
| # Extract pre blocks. | |
| extractions = {} | |
| def pre_extraction_callback(matchobj): | |
| digest = md5(matchobj.group(0)).hexdigest() | |
| extractions[digest] = matchobj.group(0) | |
| return "{gfm-extraction-%s}" % digest |
| #Backup: | |
| adb remount | |
| adb pull /data/data/com.android.providers.telephony/databases/mmssms.db mmssms.db | |
| #Restore: | |
| adb remount | |
| adb push mmssms.db /data/data/com.android.providers.telephony/databases/mmssms.db |
| ''' | |
| @author: tintinweb | |
| python asn.1 decoder including utility functions for pem format certificates | |
| ''' | |
| import re,hashlib, binascii | |
| class ASN1Element(object): | |
| TYPE_UNIVERSAL = 0x00 |
| redis = require 'redis' | |
| client = redis.createClient() | |
| SS_PREFIX = 'ss:' | |
| # | |
| # user | |
| # name: shadowsocks 的用户名 | |
| # password: shadowsocks 的密码 | |
| # method: shadowsocks 的加密方法 |
If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:
let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav| # Derived from this: https://github.com/gashton/bambustudio_tools/blob/master/bambudiscovery.sh | |
| # Python implementation without need for linux | |
| # Send the IP address of your BambuLab printer to port 2021/udp, which BambuStudio is listens on. | |
| # Ensure your PC has firewall pot 2021/udp open. This is required as the proper response would usually go to the ephemeral source port that the M-SEARCH ssdp:discover message. | |
| # But we are are blindly sending a response directly to the BambuStudio listening service port (2021/udp). | |
| # Temporary solution to BambuStudio not allowing you to manually specify the Printer IP. | |
| # Usage: |