Skip to content

Instantly share code, notes, and snippets.

View prosenjit-manna's full-sized avatar
🎯
Focusing

Prosenjit Manna prosenjit-manna

🎯
Focusing
  • Itobuz Technologies
View GitHub Profile
@prosenjit-manna
prosenjit-manna / .htaccess
Created August 19, 2016 05:31 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@prosenjit-manna
prosenjit-manna / README.md
Created August 25, 2016 06:15 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@prosenjit-manna
prosenjit-manna / ALTERNATIVES.adoc
Created November 1, 2016 08:00 — forked from mbbx6spp/ALTERNATIVES.adoc
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
function hl_theme_icons() {
return array(
array( 'hl-icon-commerce' => __( 'Commerce', 'js_composer' ) ),
array( 'hl-icon-cup-and-plate' => __( 'cup and plate', 'js_composer' ) ),
array( 'hl-icon-envelope2' => __( 'envelope2', 'js_composer' ) ),
array( 'hl-icon-facebook2' => __( 'facebook2', 'js_composer' ) ),
array( 'hl-icon-favorite' => __( 'favorite', 'js_composer' ) ),
);
}
@prosenjit-manna
prosenjit-manna / AWS-config.md
Created December 29, 2016 05:13
Fucking Yes! AWS setup for Wordpress Server

Fucking Yes! AWS setup for Awesome Fast Wordpress Server

Ramblings and notes of my experiments with AWS which I will later turn into more coherent instructions.

Sooo... I'm about to be released into the wild as a free roaming web developer. I won't have the company hosting anymore and it's damn well about time I got my own shit sorted. After a little reading I have decided to give Amazon Web Services a try. So far I am loving it.

I have oooooooodles of control. It's super nerdy and more importantly, it's super fast. Seriously - I had fun.

When I first set this up i tried following some third party tutorials to get a wordpress server setup and running on Amazon Web Services. After some trial and error I found the proper documentation and everything when much more smoothly (I know right)! The AWS docs are very detailed and easy to follow.

@prosenjit-manna
prosenjit-manna / menu.js
Created February 9, 2017 11:13
Wordpress menu
/**
* WPmenu
*
* Horizontal Multilevel Menu with WP MegaMenu Support
*
* 3.0 | Wordpress Menu
*/
;(function($){
"use strict";
@prosenjit-manna
prosenjit-manna / gist:6e380c9aab7f9d17df72f5a637215fb5
Created May 11, 2017 13:14 — forked from wpexplorer/gist:cce8a00830af9d649afd4a0a7e219937
Advanced wp_oembed_get output for videos to add classes & params
// Function
function wpex_video_oembed( $video = '', $classes = '', $params = array() ) {
// Define output
$output = '';
// Sanitize URl
$video = esc_url( $video );
// Video required

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'.

{
"name": "invited-ionic3",
"description": "An Ionic project",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",