Skip to content

Instantly share code, notes, and snippets.

Mohamad Atie MohamadAtieh

Block or report user

Report or block MohamadAtieh

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
fernandohu / Reading configuration files before application startup in Angular2 final
Last active Aug 20, 2019
Reading configuration files before application startup in Angular2 final release
View Reading configuration files before application startup in Angular2 final

Reading data before application startup in Angular 2

In this demonstration I will show you how to read data in Angular2 final release before application startup. You can use it to read configuration files like you do in other languages like Java, Python, Ruby, Php.

This is how the demonstration will load data:

a) It will read an env file named 'env.json'. This file indicates what is the current working environment. Options are: 'production' and 'development';

b) It will read a config JSON file based on what is found in env file. If env is "production", the file is 'config.production.json'. If env is "development", the file is 'config.development.json'.

mauvm /
Created Nov 12, 2015
Jasmine ES6 run script for use with Babel 6
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine


  "presets": ["es2015"]
pakoito / gist:5f4584c0ccad322080d1
Last active Aug 29, 2015
Simple RecyclerView.OnScrollListener with RxJava subjects
View gist:5f4584c0ccad322080d1
Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
burgalon /
Last active Nov 17, 2019
Implementing OAuth2 with AccountManager, Retrofit and Dagger
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
staltz /
Last active Nov 21, 2019
The introduction to Reactive Programming you've been missing
ksoichiro /
Created Aug 19, 2012
Android: Clickable URL and clickable TextView
package com.blogspot.ksoichiro.linktest;
import android.text.Layout;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
jbroadway /
Last active Nov 4, 2019
Slimdown - A simple regex-based Markdown parser.


A very basic regex-based Markdown parser. Supports the following elements (and can be extended via Slimdown::add_rule()):

  • Headers
  • Links
  • Bold
  • Emphasis
  • Deletions
mjbommar / plotHashtag2.R
Created May 21, 2012
Plot a time series of a hashtag where height is tweet count and color is unique user count.
View plotHashtag2.R
# @author: Bommarito Consulting, LLC;
# @date: May 21, 2012
# @email:
# @packages: ggplot2, plyr
# Clear and import.
You can’t perform that action at this time.