Skip to content

Instantly share code, notes, and snippets.

View Soufien's full-sized avatar
Living

Soufien Soufien

Living
  • Paris
View GitHub Profile
import android.app.Application;
import android.content.Context;
import android.util.Log;
import com.strongloop.android.loopback.RestAdapter;
public class MyApplication extends Application {
public static RestAdapter adapter=null;
public static Context context=null;
import com.strongloop.android.loopback.User;
import com.strongloop.android.loopback.UserRepository;
import inc.bulldozer.pointeuseandroid.MyApplication;
public class UtilisateurRepository extends UserRepository<Utilisateur> {
private static UtilisateurRepository mInstance = null;
public interface LoginCallback extends UserRepository.LoginCallback<Utilisateur> {
#!/bin/sh
ADB_PATH="/Users/medyo/Library/Android/sdk/platform-tools"
PACKAGE_NAME="com.mobiacube.elbotola.debug"
DB_NAME="default.realm"
DESTINATION_PATH="/Users/Medyo/Desktop/"
NOT_PRESENT="List of devices attached"
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'`
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then
echo "Make sure a device is connected"
else
@Soufien
Soufien / example.js
Created April 13, 2018 15:00 — forked from colingourlay/example.js
Lodash / Underscore sort object keys. Like _.sortBy(), but on keys instead of values, returning an object, not an array. Defaults to alphanumeric sort.
var obj = {b: 3, c: 2, a: 1};
_.sortKeysBy(obj);
// {a: 1, b: 3, c: 2}
_.sortKeysBy(obj, function (value, key) {
return value;
});
// {a: 1, c: 2, b: 3}
@Soufien
Soufien / dribbble.css
Created May 15, 2018 14:20
Create social media buttons with CSS3 gradients.
/*
Dribbble
------------------------------------------------------------ */
a.button-dribbble {
background-color: #c93764; /* fallback color */
background: -moz-linear-gradient(top, #ea4c89, #c93764);
background: -ms-linear-gradient(top, #ea4c89, #c93764);
background: -webkit-linear-gradient(top, #ea4c89, #c93764);
border: 1px solid #c93764;
@Soufien
Soufien / bitbucket-pipelines.yml
Created July 23, 2018 19:05 — forked from mcnamee/bitbucket-pipelines.yml
Bitbucket Pipelines - Deploy via FTP to shared hosting
# Installation ---
# 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables.
# 2. Commit this file to your repo
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
# push everything and initial GitFTP)
#
# Usage ---
# - On each commit to master branch, it'll push all files to the $FTP_HOST
# - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises
# - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you
@Soufien
Soufien / database.rules.json
Created April 22, 2019 17:02 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}