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
Original String: | |
I couldn't believe that I could actually understand what I was reading: | |
the phenomenal power of the human mind. According to a research team at Cambridge University, | |
it doesn't matter in what order the letters in a word are, the only important thing is that the | |
first and last letter be in the right place. The rest can be a total mess and you can still read | |
it without a problem. This is because the human mind does not read every letter by itself, but the | |
word as a whole. Such a condition is appropriately called Typoglycemia. Amazing, huh? Yeah and you | |
always thought spelling was important. | |
Converted String: |
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
#include <stdint.h> | |
#include <stdlib.h> | |
// assert(RAND_MAX >= 0x7fff) | |
float | |
random_0_to_1() { | |
union { | |
uint32_t d; | |
float f; | |
} u; |
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
import java.io.*; | |
import java.nio.file.*; | |
import java.security.*; | |
import java.security.cert.*; | |
import javax.net.ssl.*; | |
import org.bouncycastle.jce.provider.*; | |
import org.bouncycastle.openssl.*; | |
public class SslUtil |
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
/////////////////////////////////////////////////////// | |
// Talk is cheap. Show me the code. - Linus Torvalds | |
/////////////////////////////////////////////////////// | |
public abstract class CalculatorBase : IDisposable { | |
protected void StartCore() { | |
// ... | |
} | |
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 | |
# coding: utf-8 | |
''' | |
中国联不通每月通话时间统计 | |
用法: | |
1. 去 http://iservice.10010.com/ 下载通话详单(Excel 格式),导出为 CSV | |
2. ./sumup.py *.csv | |
''' |
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 | |
# -*- coding: utf-8 -*- | |
# This script helps removing Git branches. | |
# Run it from a git repo dir. It will open the Git branches list | |
# in your favorite editor. Delete some branches from the list. | |
# Save and close the file. The script applies the changes to the repo. | |
from subprocess import call, Popen, PIPE | |
from os import getenv |
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
#ADB tool for the Raspberry Pi and similar environments not supported by the Android SDK. | |
#based on https://gist.github.com/splhack/958335 | |
#This is a very simple hack for building adb on its own, using a lot of stock Linux libraries (libssl, libcrypt) | |
#in place of the versions shipped with AOSP, in order to avoid having to pull down a lot of code. | |
#git clone https://android.googlesource.com/platform/system/core system/core | |
#The method below does not work with the most recent version (you will see const char* conversion errors | |
#as a C file has been changed to a CPP one where that is more strict). However, it _can_ be made to work |