This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Angular 2 Recursive List</h1> | |
<ul> | |
<ng-template #recursiveList let-list> | |
<li *ngFor="let item of list"> | |
{{item.title}} | |
<ul *ngIf="item.children.length > 0"> | |
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container> | |
</ul> | |
</li> | |
</ng-template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a file C:\Users\[user]\.bashrc | |
# add this content | |
# add your own aliases or changes these ones as you like | |
# to make a dot (.bashrs) file in windows, create a file ".bashrs." (without extention) and save. windows will save it as ".bashrc" | |
# run `source ~/.bashrc` in console | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias gs='git status -bsu' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../library.test.d.ts"/> | |
import * as angular from "angular"; angular; | |
import * as mocks from "angular-mocks/ngMock"; mocks; | |
describe('feat(localStorage Mock): ', function() { | |
beforeAll(() => { | |
angular.module('mock-module',[]) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
## Example ## | |
<MatchMedia mediaWidth={["(min-width: 768px)", "(min-width: 1280px)"]}> | |
<Checkbox | |
id="check_1" | |
label="Hello World!" | |
checked={isChecked} | |
onChange={() => this.setState({ isChecked: !isChecked })} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import hmac | |
import base64 | |
def make_digest(message, key): | |
key = bytes(key, 'UTF-8') | |
message = bytes(message, 'UTF-8') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Injectable} from '@angular/core'; | |
import {DateAdapter} from '@angular/material'; | |
import {addDays, addMonths, addYears, format, getDate, getDaysInMonth, getMonth, getYear, parse, setDay, setMonth, toDate} from 'date-fns'; | |
// CONFIG. Use environment or something for a dynamic locale and settings | |
import {es as locale} from 'date-fns/locale'; | |
const WEEK_STARTS_ON = 1; // 0 sunday, 1 monday... | |
export const MAT_DATE_FNS_DATE_FORMATS = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { join } = require('path'); | |
const { readdirSync, renameSync } = require('fs'); | |
const [dir, search, replace] = process.argv.slice(2); | |
const match = RegExp(search, 'g'); | |
const files = readdirSync(dir); | |
files | |
.filter(file => file.match(match)) | |
.forEach(file => { | |
const filePath = join(dir, file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# overwrite master with contents of seotweaks branch (seotweaks > master) | |
git checkout seotweaks # source name | |
git merge -s ours master # target name | |
git checkout master # target name | |
git merge seotweaks # source name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Description: fix incorrect function parsing | |
Author: Chet Ramey <[email protected]> | |
Index: bash-4.2/bash/builtins/common.h | |
=================================================================== | |
--- bash-4.2.orig/bash/builtins/common.h 2010-05-30 18:31:51.000000000 -0400 | |
+++ bash-4.2/bash/builtins/common.h 2014-09-22 15:30:40.372413446 -0400 | |
@@ -35,6 +35,8 @@ | |
#define SEVAL_NOLONGJMP 0x040 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ql:quickload :cl-ppcre) | |
(ql:quickload :rutils) | |
(use-package :rutil) | |
(named-readtables:in-readtable rutils-readtable) | |
(defpar *orig* | |
#/I joined Hacker News around 5 years ago. I used to wake up and do the grim commute each morning to London from my home and the only thing that made it vaguely ok was Hacker News. It was a great place to go and find interesting articles from genuinely passionate people. It also used to be a really safe place to launch a startup that you'd spent days, weeks, years on - your project. It was a place where you could launch your startup and know you'd get great constructive feedback. People may not necessarily like your site but they'd admire you for having the balls to launch it, for spending time developing something that you hoped could benefit people in some way. They'd want you to succeed and they'd try and help you succeed with feedback that would ultimately help you. Unfortunately, today's Hacker News audience is no longer the same. Today's Hacker News is a place where us |
OlderNewer