This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TxThinking Individual Contributor License Agreement | |
In order to clarify the intellectual property license granted with Contributions from any person or entity, Cloud <cloud@txthinking.com> and TxThinking, Inc. ("TxThinking") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of TxThinking; it does not change your rights to use your own Contributions for any other purpose. | |
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to TxThinking. Except for the license granted herein to TxThinking and recipients of software distributed by TxThinking, You reserve all right, title, and interest in and to Your Contributions. | |
1. Definitions. | |
"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with TxThinking. F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"crypto/tls" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// There are many pastebin service: https://soso.ooo/search.html?q=pastebin | |
// This too, and with times limit, expiration, and browser User-Agent limit, allow only Go and Dart UA for Brook GUI | |
// | |
// This script will create a webserver on http://127.0.0.1:2023 | |
// You can modify the listen address at the bottom of this file. | |
// | |
// Because the data is stored in localStorage, there is a size limit of 10M, and a clearing operation will be performed automatically after exceeding. | |
// So, you can fork and modify me. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > sitemap.xml | |
echo "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">" >> sitemap.xml | |
for l in `ls -l --time-style '+%Y-%m-%dT%H:%M:%SZ' ./articles | grep -P '\.article' | awk '{print $6";"$7}'` | |
do | |
t=`echo $l | cut -d\; -f1` | |
f=`echo $l | cut -d\; -f2` | |
echo "<url>" >> sitemap.xml | |
echo "<loc>https://talks.txthinking.com/articles/$f</loc>" >> sitemap.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var unbelievable_sort = (a) => { | |
for (var i = 0; i < a.length; i++) { | |
for (var j = 0; j < a.length; j++) { | |
if (a[i] < a[j]) { | |
var x = a[i]; | |
a[i] = a[j]; | |
a[j] = x; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Steps: | |
# | |
# 1. Download corresponding html file for some README.md: | |
# curl -s $1 | |
# | |
# 2. Discard rows where no substring 'user-content-' (github's markup): | |
# awk '/user-content-/ { ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/binary" | |
"flag" | |
"fmt" | |
"net" | |
"os" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Send DNS Query A record of domain: txthinking.com to 119.29.29.29:53 | |
# | |
from socket import * | |
from binascii import * | |
import struct | |
s = socket(AF_INET,SOCK_DGRAM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file jQuery.js | |
* @brief nothing | |
* @author cloud@txthinking.com | |
* @version 0.0.1 | |
* @date 2013-06-21 | |
*/ | |
(function() { | |
var jQuery = function() { | |
if (this == window) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!-[1,]) | |
// [1,]: array | |
// array to string ie: 1, not ie: 1 | |
// -: string to integer ie:NaN(1,) not ie: 1(1) | |
// !NaN: true !1: false | |
alert("Hi! You are using a 2B browser now!"); |