Skip to content

Instantly share code, notes, and snippets.

View adastreamer's full-sized avatar
🤺
What's happening?

Eugene Khashin adastreamer

🤺
What's happening?
View GitHub Profile
@adastreamer
adastreamer / entrypoint.sh
Created May 19, 2017 19:08
An example of Docker entrypoint which does an exec of RUN command
#!/bin/bash
echo "Seeding the files..."
if [ ! -f /data/.do_not_init_me ]; then
echo "Copying the initial files..."
rm -rf /data/.* 2> /dev/null
cp -pri /data_init/. /data/
else
echo "Skipping the initial seeding!"
public void makeRequest(final String url, final String json) {
Runnable runable = new Runnable() {
public void run() {
try{
OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
Request request = new Request.Builder()
.header("User-Agent", "Mozilla/5.0 (Linux; Android 6.0.1; SM-webview_android_dl Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36")
.addHeader("Content-Type","application/json")
<div class="col-12 col-md-4 text-center text-bold">
<h2 class="number" id="contract-balance">$135 000</h2>
<p class="text mt-0">Баланс смарт-контракта</p>
</div>
<div class="col-12 col-md-4 text-center text-bold">
<h2 class="number" id="investors-count">10</h2>
<p class="text mt-0">Количество инвесторов</p>
</div>
<div class="col-12 col-md-4 text-center text-bold">
<h2 class="number" id="tokens-count">10 342</h2>
#!/bin/bash
PORT_FILE=/home/deployer/PORT
APP_DIR=/var/www/cryptoprocessing
APP_PIDS_DIR=$APP_DIR/tmp/pids
UPSTREAM_CONFIG_FILE=/home/deployer/UPSTREAM_SERVERS
PORT=$(cat $PORT_FILE)
if [ "$PORT" == "3000" ]
then