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
fernandohu / Reading configuration files before application startup in Angular2 final release.md
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 release.md

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
mauvm / Jasmine-and-Babel6.md
Created Nov 12, 2015
Jasmine ES6 run script for use with Babel 6
View Jasmine-and-Babel6.md
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine

.babelrc:

{
  "presets": ["es2015"]
@pakoito
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@burgalon
burgalon / AccountAuthenticator.java
Last active Nov 17, 2019
Implementing OAuth2 with AccountManager, Retrofit and Dagger
View AccountAuthenticator.java
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
@staltz
staltz / introrx.md
Last active Nov 21, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
@ksoichiro
ksoichiro / LinkUtils.java
Created Aug 19, 2012
Android: Clickable URL and clickable TextView
View LinkUtils.java
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;
import android.text.style.ClickableSpan;
@jbroadway
jbroadway / Slimdown.md
Last active Nov 4, 2019
Slimdown - A simple regex-based Markdown parser.
View Slimdown.md

Slimdown

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
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; http://michaelbommarito.com/
# @date: May 21, 2012
# @email: michael@bommaritollc.com
# @packages: ggplot2, plyr
# Clear and import.
rm(list=ls())
library(ggplot2)
library(plyr)
You can’t perform that action at this time.