Skip to content

Instantly share code, notes, and snippets.

View judeebene's full-sized avatar
👨‍💻
Multi-tasking and breaking things

Jude Ben judeebene

👨‍💻
Multi-tasking and breaking things
  • London
View GitHub Profile
@judeebene
judeebene / bitmapscaling.java
Last active October 10, 2015 21:34
Image Scaling
//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;
// use for testing and debug FCM
FCM_SERVER_KEY=""
BODY=$(cat <<END
{ "data": {
"place_category": "hairdressers",
"place_id":"-KWq4IDMf0ypm0UF3T9W"
},
"to" : "/topics/user_rDV4akEdW2OiV4ziailFf2meQFI3",
}
@judeebene
judeebene / cheese in model
Created April 2, 2017 20:57
cheese in model
package model;
import android.media.Image;
import android.widget.ImageView;
import java.util.Random;
import java.util.UUID;
@judeebene
judeebene / cheese without model package
Created April 2, 2017 20:58
cheese without model package
package com.support.android.designlibdemo;
import android.widget.ImageView;
import java.util.Random;
import java.util.UUID;
public class Cheeses {
{
"states": [
{
"name": "Abia State",
"id": 1,
"locals": [
{
"name": "Aba South",
"id": 1
},
@judeebene
judeebene / strat.js
Created June 17, 2017 14:51
strategy fot auto cryto trading
// Let's create our own strategy
var strat = {};
var parameters = {
short: 12,
long: 26,
signal: 9,
down: -0.0001,
up: 0.005,
persistence: 1
0x7313626440Ac187e3632ed75409488623B1147Dc
@judeebene
judeebene / bot.sh
Created August 26, 2017 13:49
A simple cron job task to check if the app is top and start app in digital ocean every one hour
#!/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
@judeebene
judeebene / ionic errors doc
Last active November 27, 2017 11:27
Ionic codes errors documentations
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: