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
task androidJar(type:Exec) { | |
commandLine = ['jar', 'cf', 'build/EmailChecker.jar', '-C', 'build/classes/release', '.', 'libs/native-libs-0.1.jar'] | |
} |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6.+' | |
} | |
} | |
apply plugin: 'android' |
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
function reduce_tqr_time_font_size() { | |
var a = document.querySelectorAll("tr span"); | |
var i = 0; | |
for (i = 0; i < a.length; i++) { | |
a[i].setAttribute("style", "font-size: 0.7em"); | |
} | |
} |
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
from collections import defaultdict | |
def detect_language(scores, input_str): | |
tokens = input_str.split() | |
results = defaultdict(int) | |
for token in tokens: | |
if token in scores: | |
language, score = scores[token][0] | |
results[language] += score | |
max_lang, max_score = max(results.items(), key=lambda x:x[1]) |
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
_up () { | |
compadd $(up -h|grep " "|tr -s " "|tr "," "\n"|sed -E "s/ ([a-zA-Z-]+)[ ,].*/\1/") | |
_arguments -s "*:files:_files" | |
} | |
compdef _up up |
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 | |
import sys | |
from electrum import Interface | |
from electrum import bitcoin, Transaction | |
def get_transactions(addr): | |
interface = Interface({'server':'electrum.be:50001:t'}) | |
interface.start() |
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
deps="$(find . -iname "build.gradle" | xargs grep 'compile ' | grep -v project | sed -E "s/.*'(.*)'.*/\1/" | sort | uniq)" | |
function printTemplate() { | |
cat << EOF | |
remote_file( | |
name = '$1-file', | |
out = '$2', | |
url = 'mvn:$4:$1:aar:$3', | |
sha1 = '0ec99fae8716984ec56489fb45d1ae752724bae7', | |
) |
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 random | |
import requests | |
import os | |
from urllib import request | |
from bs4 import BeautifulSoup | |
from multiprocessing import Pool | |
base_url = "http://imgur.com" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:paddingLeft="24dp" | |
android:paddingRight="16dp"> | |
<View | |
android:background="@android:color/holo_red_dark" | |
android:id="@+id/my_site_list_row_empty_icon" |
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/sh | |
# Example inputs: | |
# dashicon_admin_site | |
# dashicon_admin_users | |
# dashicon_lock | |
# dashicon_edit | |
# dashicon_email | |
if [ x$2 == x ]; then |