This file contains hidden or 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 | |
# | |
# Strict mode: http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
set -euo pipefail | |
IFS=$'\n\t' | |
# | |
# Usage: script -f fileToPull -p packageName | |
# |
This file contains hidden or 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(BuildConfig.DEVELOPER_MODE){ | |
doDeveloperModeThing(); | |
} | |
... |
This file contains hidden or 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 org.apache.commons.codec.binary.Hex; | |
import sun.misc.CRC16; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.net.URL; | |
import java.util.zip.CRC32; | |
import java.util.zip.Checksum; |
This file contains hidden or 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 com.example.scan | |
import org.uribeacon.scan.compat.BluetoothLeScannerCompat; | |
import org.uribeacon.scan.compat.BluetoothLeScannerCompatProvider; | |
import org.uribeacon.scan.compat.ScanCallback; | |
import org.uribeacon.scan.compat.ScanResult; | |
import android.content.Context; | |
import android.util.Log; | |
import java.util.List; | |
import rx.Observable; |
This file contains hidden or 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
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/", methods=['POST']) | |
def nobody(): | |
return "" | |
if __name__ == "__main__": | |
app.run(host='0.0.0.0') |
This file contains hidden or 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 xml.etree.ElementTree as ET | |
def parse_text(line): | |
clean_line = line | |
clean_line = clean_line.replace("…", "...") | |
clean_line = clean_line.replace("\u2020", "") | |
clean_line = clean_line.replace("–", "-") | |
clean_line = clean_line.replace("©", "(copy)") | |
element = ET.fromstring(clean_line) | |
return element.text |