See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
{-# OPTIONS_GHC -fno-warn-orphans #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
-- | Print STG in GHC 8.4.3. | |
module Main where | |
import Control.Monad.IO.Class (liftIO) | |
import qualified CorePrep |
#!/usr/bin/env bash | |
cat "$1" \ | |
| sed -r 's/^(\s*)#/\1\/\//' \ | |
| sed -r 's/!//g' \ | |
| sed -r 's/^input /export interface /g' \ | |
| sed -r 's/^enum /export enum /g' \ | |
| sed -r 's/^type /export interface /g' \ | |
| sed -r 's/^union /export type /g'\ | |
| sed -r 's/^schema /export interface schema /g' \ | |
| sed -r 's/^(\s+[a-zA-Z0-9_-]+\s*)\([^\)]+\)(\s*:\s*)/\1\2/g' \ |
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'.
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics.Contracts; | |
using System.Web.Http.Dependencies; | |
using Ninject; | |
using Ninject.Syntax; | |
public class NinjectDependencyScope : IDependencyScope | |
{ | |
private IResolutionRoot resolver; |
module Y { | |
interface Anim extends Base { | |
} | |
interface App extends App_Base, App_Content, App_Transitions, PjaxContent { | |
(config?: any); | |
terminal = require('terminal') | |
console.log terminal.ANSIFormat("{{magenta}}Hello {{blue}}World!{{reset}}") | |
console.log terminal.ANSIStyle('red;inverse') + "ERROR:" + terminal.ANSIStyle('default;noinverse') + " method not found" |