from this
import Head from '~components/Commons/Head';
require('~images/test.jpg')
to this
func WithVersionFromBuildInfo() ServiceOption { | |
return func(s Service) { | |
if info, ok := debug.ReadBuildInfo(); ok { | |
var ( | |
revision string | |
modified string | |
timestamp time.Time | |
version string | |
) |
echo $AGENT_UUID |
def flatten(nested_array, start=[]): | |
[flatten(x, start) if type(x) == list else start.append(x) for x in nested_array] | |
return start | |
# test | |
given_array = [[1, 2, [3]], 4] | |
print(flatten(given_array)) |
from this
import Head from '~components/Commons/Head';
require('~images/test.jpg')
to this
export const actionToPlainObjectMiddleware = store => next => action => { | |
if (typeof action === 'object' && action.type) { | |
const toForward = { ...action }; | |
return next(toForward); | |
} else if (typeof action === 'function') { | |
let toForward = action(); | |
toForward = { ...toForward }; | |
return next(toForward); | |
} else { | |
throw new Error('Action must be FSA'); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import { Headers, RequestOptionsArgs, Response, Request } from '@angular/http'; | |
import { Observable } from 'rxjs/Observable'; | |
interface IRestConfig { | |
baseHeaders?: Headers; | |
baseUrl: string; | |
path?: string; | |
} | |
interface IRestQuery { |
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
xcode-select --install
will prompt up a dialog)Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
import itertools, json, operator | |
from string import capwords | |
from django.core import serializers | |
from django.db.models.manager import Manager, QuerySet | |
from django.utils import timezone as _tz | |
from dateutil.relativedelta import * | |
from dateutil import parser as dt_parser | |