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/sh | |
## | |
# QRCode Generator for ShadowSocks Configuration using Google Chart API | |
# Require: | |
# - jq (https://stedolan.github.io/jq/) | |
# - wget | |
## | |
if [ -z "$1" -o -z "$2" ] | |
then |
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
-- | |
-- Query unique GeoHash prefixes | |
-- | |
SELECT | |
SUBSTR(p.last_location, 1, :length) prefix, | |
COUNT(p.id) count | |
FROM | |
user_profile p | |
GROUP BY prefix; |
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 node:5.3.0 | |
WORKDIR /usr/src/app | |
ENV NODE_ENV=production NPM_CONFIG_REGISTRY=http://registry.npm.taobao.org/ | |
COPY package.json ./package.json | |
RUN npm install && rm -rf /tmp/npm-* |
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
var minstd_rand0 = (function (a, c, m) { | |
return function (seed) { | |
var x = seed || 1; | |
return function () { | |
return x = (a * x + c) % m; | |
}; | |
}; | |
})(16807, 0, 2147483647); | |
var BITS_PER_BYTE = 8; |
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
find_package(PkgConfig) | |
pkg_search_module(OpenSSL REQUIRED openssl) | |
pkg_search_module(ngHTTP2 REQUIRED libnghttp2) | |
find_library(ngHTTP2_LOCATION NAMES ${ngHTTP2_LIBRARIES}) | |
# Resolve OpenSSL library names to paths (fixes conflict with default ssl implementation on OS X) | |
foreach(name ${OpenSSL_LIBRARIES}) | |
find_library(${name}_LOCATION ${name} PATHS ${OpenSSL_LIBRARY_DIRS} NO_DEFAULT_PATH) | |
list(APPEND OpenSSL_LIBRARIES_ ${${name}_LOCATION}) |
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
* { | |
margin: 0; | |
padding: 0; | |
} | |
html, body { | |
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif; | |
font-size: 14px; | |
color: #444; | |
} | |
section { |
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 android.graphics.Bitmap; | |
import android.graphics.Color; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.ColorDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.TransitionDrawable; | |
import android.view.View; | |
import com.squareup.picasso.Picasso; | |
import com.squareup.picasso.Target; |
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
public class QueryDefaults { | |
private static QueryDefaults _Instance; | |
public static synchronized QueryDefaults getInstance() { | |
if (_Instance == null) { | |
_Instance = new QueryDefaults(); | |
} | |
return _Instance; |
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 moe.banana.foundation; | |
import android.os.Bundle; | |
import android.os.Parcelable; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import java.util.ArrayList; |
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
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape> | |
<solid android:color="?attr/colorPrimary"/> | |
</shape> | |
</item> | |
<item android:gravity="right|center_vertical" android:width="200dp" android:height="200dp" android:right="30dp" android:top="-100dp" android:bottom="-100dp"> | |
<shape android:shape="oval"> | |
<solid android:color="?attr/colorAccent"/> | |
</shape> |