Skip to content

Instantly share code, notes, and snippets.

View talamaska's full-sized avatar

Zlati Pehlivanov talamaska

View GitHub Profile
.platform-android4_1 {
/*Any styles for android 4.1*/
}
.platform-android4_3 {
/*Any styles for android 4.3*/
}
.platform-android4_4 {
/*Any styles for android 4.4*/
@dimitardanailov
dimitardanailov / 01.crazy-towns.md
Last active June 9, 2016 12:05
Front-end Lightning Talks: Object Oriented CSS Framework and Crazy Towns

Crazy Towns

It’s all about the key selector

What determines the impact of a selector is its key selector. The key selector is a very important thing in the world of CSS as browsers read selectors right to left. This means the key selector is the last one before the opening {, for example:

.header ul      { /* ‘ul’ is the key selector */ }
.ul li a        { /* ‘a’ is the key selector */ }
p:last-child { /* ‘:last-child’ is the key selector */ }
@ivosabev
ivosabev / 0 Readme.md
Last active May 12, 2017 08:27
The Hitchhiker's Guide to the Galaxy of React - Sample Code

In a few simple steps we will create an app that has a link with a counter that increases every time we click it.

We will start with very low and rudementary implementation of a store and with each example evolve it to reach a basic Flux and then Redux implementation.

  1. Global variable - single component
  2. Global variable - multiple components
  3. Props
  4. State
  5. Flux
  6. Redux
@jorilallo
jorilallo / Github's usage of the showdown.js in example
Created October 13, 2011 01:16
Showdown.js with GitHub Flavored Markdown
$(function() {
var converter = new Showdown.converter();
$("#user_input").keyup(function(){
var txt = $("#user_input").val();
var html = converter.makeHtml(txt);
$("#result").html(html)
$("#html_result").val(html.replace(/>/g, ">\n").replace(/</g, "\n<").replace(/\n{2,}/g, "\n\n"));
});
var sample = "#### Underscores\nthis should have _emphasis_\nthis_should_not\n_nor_should_this\n\n\
@lexmihaylov
lexmihaylov / native-hash.js
Last active January 2, 2018 03:29
Hashing using the native crypto api and native promise api
function arrayBufferToStringAsync( /*ArrayBuffer*/ buffer) {
var reader = new FileReader();
return readAsync(reader, 'Text', new Blob([buffer])).then(function() {
return new Promise(function(resolve, reject) {
resolve(reader.result);
});
});
};
function arrayBufferToHexAsync( /*ArrayBuffer*/ buffer) {
import { Directive, ElementRef, forwardRef, Input, Renderer2 } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { fromEvent } from 'rxjs/observable/fromEvent';
import { merge } from 'rxjs/observable/merge';
import { timer } from 'rxjs/observable/timer';
import { Subscription } from 'rxjs/Subscription';
export const DEFAULT_VALUE_ACCESSOR : any = {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => NgControlOptionsDirective),
@DevWurm
DevWurm / entry.js
Last active March 4, 2019 15:21
angular-cli Electron configuration
const {app, BrowserWindow} = require('electron')
const path = require('path')
const url = require('url')
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win
function createWindow () {
// Create the browser window.
import { Component, OnInit, ViewChild, Input } from '@angular/core';
import { MatPaginator, MatSort } from '@angular/material';
import { NgxDataTableDataSource } from './ngx-data-table-datasource';
@Component({
selector: 'ngx-data-table',
templateUrl: './ngx-data-table.component.html',
styleUrls: ['./ngx-data-table.component.css']
})
export class NgxDataTableComponent {
import { Injectable } from '@angular/core';
import {
ActivatedRouteSnapshot,
CanActivate,
Router,
RouterStateSnapshot,
} from '@angular/router';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
@wesleygrimes
wesleygrimes / upgrading-to-angular-ngrx-8.md
Created June 12, 2019 19:17
Upgrading to Angular v8 and NgRx v8

Upgrading to Angular 8 and NgRx 8

Overview

Do you have an awesome application written with Angular v7 using NgRx v7, but have been feeling left out will all the mentions online and at conferences about Angular v8 and NgRx v8? Well you are in luck! Today we will explore together, how to upgrade our applications to use Angular v8 using the Angular CLI tooling. We will also explore upgrading to NgRx v8. This will allow us to take advantage of the new features provided in NgRx v8. Included with NgRx v8 is a shiny set of creators, or type-safe factory functions, for actions, effects, and reducers.

Upgrading Dependencies

Upgrading Angular

The Angular team has provided a great website that walks through the process of upgrading in-depth. This website can be found at Angular Update Tool. We will touch on some of the information today.