Skip to content

Instantly share code, notes, and snippets.

View alejandroSuch's full-sized avatar
🖖
Always helping people

Alejandro Such alejandroSuch

🖖
Always helping people
View GitHub Profile
@alejandroSuch
alejandroSuch / gh-pages.md
Created October 28, 2018 17:09 — forked from ramnathv/gh-pages.md
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
<div *ngIf="planetsAndTotal$ | async as data; else loading">
<mat-nav-list>
<a mat-list-item *ngFor="let planet of data.planets" [routerLink]="['/planets', planet.id]">
<h4 class="title" mat-line>{{ planet.name }}</h4>
<mat-icon>chevron_right</mat-icon>
</a>
</mat-nav-list>
<mat-paginator [length]="data.total" [pageSize]="pageSize" [pageIndex]="currentPage - 1" [pageSizeOptions]="[5, 10, 25]"
showFirstLastButtons="false" (page)="onPage($event)">
</mat-paginator>
### BUILDER ###
FROM alexsuch/angular-cli:6.0.5 as builder
COPY . /usr/src/markdown-editor/
WORKDIR /usr/src/markdown-editor
RUN npm install
RUN ng build --prod
### FINAL IMAGE ###
FROM nginx:alpine
mongorestore \
--host ip.direccion.destino\
--port 27017\
--username miUsuario \
--password M1P455W0rD \
--db nombre_bd\
bd_dump
mongodump \
--host ip.direccion.origen \
--port 27017 \
--username miUsuario \
--password M1P455W0rD \
--db nombre_bd \
-o bd_dump
$ npx express-generator --view=pug --less --git my-project
npx: instaló 6 en 1.765s
create : my-project
create : my-project/package.json
create : my-project/app.js
create : my-project/.gitignore
create : my-project/public
create : my-project/routes
create : my-project/routes/index.js
import { Injectable } from '@angular/core';
import { Actions, Effect } from '@ngrx/effects';
import { SOME_ACTION } from '/route/to/actions-constants';
import { SomePage } from '/route/to/some-page';
@Injectable()
export class SampleEffects {
@Effect({ dispatch: false })
loginSuccess$ = this.action$
.ofType(SOME_ACTION)
exports.config = {
namespace: 'mycomponent',
generateDistribution: true,
bundles: [
{ components: ['my-component'] }
],
globalScript: 'src/global.ts',
};
div.my-component {
&::after {
content: ' (iOS VERSION)'
}
}
@Component({
tag: 'my-component',
styleUrls: {
ios: 'my-component.ios.scss',
wp: 'my-component.wp.scss',
md: 'my-component.md.scss',
desktop: 'my-component.scss',
},
shadow: true
})