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
HTML 7 mins █████████▏░░░░░░░░░░░ 43.8% | |
JSON 4 mins █████▍░░░░░░░░░░░░░░░ 26.1% | |
Vue.js 3 mins ███▊░░░░░░░░░░░░░░░░░ 18.0% | |
CSS 1 min ██▏░░░░░░░░░░░░░░░░░░ 10.5% | |
Other 0 secs ▎░░░░░░░░░░░░░░░░░░░░ 1.6% |
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
// go on you labels pages | |
// eg https://github.com/cssnext/cssnext/labels | |
// paste this script in your console | |
// copy the output and now you can import it using https://github.com/popomore/github-labels ! | |
var labels = []; | |
[].slice.call(document.querySelectorAll(".label-link")) | |
.forEach(function(element) { | |
labels.push({ | |
name: element.textContent.trim(), |
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
/** | |
* Created by Alhazmy13 on 11/6/16. | |
*/ | |
public class LocalUtility { | |
private static final String SAVED_LANG = "LOCALE_SAVED_LANG"; | |
public static void onCreate(Context context) { | |
String lang = getSavedData(context, Locale.getDefault().getLanguage()); | |
setLocale(context, lang); |
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
public class App extends Application { | |
private static final String TAG = "App"; | |
private NetComponent mNetComponent; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
mNetComponent = DaggerNetComponent.builder() | |
.appModule(new AppModule(this)) // This also corresponds to the name of your module: %component_name%Module | |
.netModule(new NetModule(UrlHelper.getBaseUrl())) |
- Create a daemon configuration script under /etc/init ( NOT /etc/init.d ):-
nano /etc/init/mybot.conf
code sample:
description "MyBot Daemon"
author "alhazmy13"
start on startup
stop on shutdown
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
// Create a RealmConfiguration that saves the Realm file in the app's "files" directory. | |
RealmConfiguration realmConfig = new RealmConfiguration.Builder(context).build(); | |
Realm.setDefaultConfiguration(realmConfig); | |
// Get a Realm instance for this thread | |
Realm realm = Realm.getDefaultInstance(); |
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
/** | |
* Created by Alhazmy13 on 7/11/16. | |
*/ | |
public class Test { | |
int arg1,arg2,arg3; | |
public Test() { | |
// A no arguments constructor that sends default values to the largest | |
this(1,2,3); |
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.company; | |
import retrofit.RestAdapter; | |
import retrofit.http.GET; | |
import retrofit.http.Path; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.functions.Action1; | |
import rx.functions.Func1; | |
import rx.functions.Func2; |
NewerOlder