Skip to content

Instantly share code, notes, and snippets.

Soufien Soufien

Block or report user

Report or block Soufien

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Soufien
Soufien / database.rules.json
Created Apr 22, 2019 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
View database.rules.json
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@Soufien
Soufien / bitbucket-pipelines.yml
Created Jul 23, 2018 — forked from mcnamee/bitbucket-pipelines.yml
Bitbucket Pipelines - Deploy via FTP to shared hosting
View bitbucket-pipelines.yml
# 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 / dribbble.css
Created May 15, 2018 — forked from bgardner/dribbble.css
Create social media buttons with CSS3 gradients.
View dribbble.css
/*
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 / example.js
Created Apr 13, 2018 — 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.
View example.js
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}
View extract_realm_database_android.sh
#!/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
View UtilisateurRepository.java
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> {
View MyApplication.java
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;
View top100AppProjects.txt
67 facebook-ios-sdk
48 Bolts-iOS
39 AFNetworking
38 Google-Mobile-Ads-SDK
38 Reachability (Apple)
37 Crashlytics
31 Flurry-iOS-SDK
30 CocoaPods
29 GoogleConversionTracking
26 SDWebImage
View .bash_profile
#############################################################################
# current prompt
#############################################################################
# \d – Current date
# \t – Current time
# \h – Host name
# \# – Command number
# \u – User name
# \W – Current working directory (ie: Desktop/)
# \w – Current working directory, full path (ie: /Users/Admin/Desktop)
View app.nginx.conf
server {
listen 80;
server_name server.mydomain.net
root /var/www/app/web;
index index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
You can’t perform that action at this time.