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
# about: display info about current system | |
function about() { | |
# OS info | |
if hash neofetch 2>/dev/null; then | |
neofetch | |
else | |
if hash archey 2>/dev/null; then | |
archey -c "$1" | |
else | |
if [ -f /etc/redhat-release ]; then |
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
#!/usr/bin/env bash | |
## get the Notes field from a Logic Pro X project (e.g. lyrics) | |
function lpxnotes_dump() { | |
# Check if a filename is provided as an argument | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: lpxnotes_dump <filename>" | |
else | |
# assuming only one Alternative | |
filename=$1/Alternatives/000/ProjectData |
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 { NgModule } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { FormsModule } from '@angular/forms'; | |
import { HttpModule } from '@angular/http'; | |
import { Routes, RouterModule } from '@angular/router'; | |
import { AppComponent } from './app.component'; | |
import { DaveService } from './_services/dave.service'; | |
import { HomeComponent } from './home/index'; |
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 { Headers, Http, Response } from '@angular/http'; | |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/catch'; | |
import { devlog } from '../_helpers/devlog'; | |
@Injectable() | |
export class DaveService { |
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 { Routes, RouterModule } from '@angular/router'; | |
import { LoginComponent } from './login/index'; | |
import { HomeComponent } from './home/index'; | |
import { AuthGuard } from './_guards/index'; | |
const appRoutes: Routes = [ | |
{ path: 'login', component: LoginComponent }, | |
{ path: 'logout', component: LoginComponent, canActivate: [AuthGuard] }, | |
{ path: '', component: HomeComponent, canActivate: [AuthGuard] }, |
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
... | |
<div class="jumbotron"> | |
<div class="container"> | |
<div class="col-sm-8 col-sm-offset-2"> | |
<router-outlet></router-outlet> | |
</div> | |
</div> | |
</div> |
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 { Component, OnInit, OnDestroy } from '@angular/core'; | |
import { Response } from '@angular/http'; | |
import { Subscription } from 'rxjs/Subscription'; | |
import { DaveService } from '../_services/dave.service'; | |
import { devlog } from '../_helpers/devlog'; | |
@Component({ | |
moduleId: module.id, | |
templateUrl: './home.component.html', |
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
// src/app/service.spec.ts | |
//import { Observable } from 'rxjs/Observable'; | |
import { Observable } from 'rxjs/Rx'; | |
import { TestBed, inject, async } from '@angular/core/testing'; | |
import { MockBackend, MockConnection } from '@angular/http/testing'; | |
import { Http, BaseRequestOptions, Response, ResponseOptions, RequestMethod } from '@angular/http'; | |
import 'rxjs/add/observable/from'; | |
import 'rxjs/add/observable/throw'; |
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
// src/app/service.ts | |
import { Injectable } from '@angular/core'; | |
import { Headers, Http } from '@angular/http'; | |
import 'rxjs/add/operator/toPromise'; | |
@Injectable() | |
export class MyService { | |
private headers = new Headers({'Content-Type': 'application/json'}); | |
private apiUrl = 'http://localhost:8000'; // URL to web api |
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
// dynamically size elements based on tallest one | |
equalheight = function(container) { | |
var currentTallest = 0, | |
currentRowStart = 0, | |
rowDivs = new Array(), | |
$el, | |
topPostion = 0; | |
$(container).each(function() { | |
$el = $(this); |
NewerOlder