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
//getDisplayHeight(context) => (display height in pixels) | |
public static int getDisplayHeight(Context context) { | |
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); | |
return displayMetrics.heightPixels; | |
} | |
// getDisplayWidth(context) => (display width in pixels) | |
public static int getDisplayWidth(Context context) { | |
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); | |
return displayMetrics.widthPixels; |
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
// use for testing and debug FCM | |
FCM_SERVER_KEY="" | |
BODY=$(cat <<END | |
{ "data": { | |
"place_category": "hairdressers", | |
"place_id":"-KWq4IDMf0ypm0UF3T9W" | |
}, | |
"to" : "/topics/user_rDV4akEdW2OiV4ziailFf2meQFI3", | |
} |
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 android.content.Context; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.design.widget.FloatingActionButton; | |
import android.support.design.widget.Snackbar; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.Toolbar; | |
import android.util.Log; |
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
package model; | |
import android.media.Image; | |
import android.widget.ImageView; | |
import java.util.Random; | |
import java.util.UUID; |
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
package com.support.android.designlibdemo; | |
import android.widget.ImageView; | |
import java.util.Random; | |
import java.util.UUID; | |
public class Cheeses { |
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
{ | |
"states": [ | |
{ | |
"name": "Abia State", | |
"id": 1, | |
"locals": [ | |
{ | |
"name": "Aba South", | |
"id": 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
// Let's create our own strategy | |
var strat = {}; | |
var parameters = { | |
short: 12, | |
long: 26, | |
signal: 9, | |
down: -0.0001, | |
up: 0.005, | |
persistence: 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
0x7313626440Ac187e3632ed75409488623B1147Dc |
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 | |
# check if the bot is running | |
# ps auxw | grep "make run" | grep -v grep | |
# make run is the process to check , you can replace with a proces | |
if !(ps auxw | grep "make run" | grep -v grep) | |
then |
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
error: build errors | |
1. gyp ERR! configure error | |
gyp ERR! stack Error: Python executable "/anaconda3/bin/python" is v3.6.2, which is not supported by gyp. | |
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0. | |
solution | |
You can use --python option to npm like so: | |
npm install --python=python2.7 | |
or set it to be used always: |
OlderNewer