cat << EOF > /somefile
These contents will go into file.
EOF
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 {Http, Headers, Response} from "@angular/http"; | |
import {Observable} from "rxjs"; | |
import "rxjs/add/operator/map"; | |
/** | |
* Login Service to obtain access_token and refresh_token. | |
*/ | |
@Injectable() | |
export class LoginService { |
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 { Router, CanActivate } from '@angular/router'; | |
import {LoginService} from "./login/login.service"; | |
@Injectable() | |
export class AuthGuard implements CanActivate { | |
constructor(private router: Router, | |
private loginService: LoginService) { } |
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
[alias] | |
all = "!sh -c \"find . -mindepth 1 -maxdepth 1 -type d -print -exec git -C {} $1 \\;\" -" |
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
blogApp.directive('gistDirective', function() { | |
return function(scope, element, attrs) { | |
scope.$watch('blogItem', function(){ | |
angular.element('[data-gist-id]').gist(); | |
}); | |
} | |
}); | |
//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
#! /bin/sh | |
# sh run-blog.sh start|stop | |
PIDFILE="/root/blog.pid" | |
JAVA_HOME="/opt/jdk" | |
JARFILE="/root/uzi-vertx-shadow.jar" | |
case $1 in | |
start) |
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
package info.usmans.blog.vertx.examples | |
import io.vertx.core.AbstractVerticle | |
import io.vertx.core.Vertx | |
import io.vertx.core.http.HttpClient | |
import io.vertx.core.http.WebSocketFrame | |
import io.vertx.core.json.JsonObject | |
fun main(args: Array<String>) { |
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
package info.usmans.blog.example | |
import io.vertx.core.AbstractVerticle | |
import io.vertx.core.Vertx | |
import io.vertx.core.net.NetClientOptions | |
fun main(args: Array<String>) { | |
Vertx.vertx().deployVerticle(NetClientExample()) | |
println("Running NetClientExample!") |
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
.gradle | |
build/ | |
out/ | |
logs/ | |
# Ignore Gradle GUI config | |
gradle-app.setting | |
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | |
!gradle-wrapper.jar |
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
<configuration> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>logs/vertx-net-client.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<!-- daily rollover --> | |
<fileNamePattern>logs/vertx-net-client.%d{yyyy-MM-dd}.log</fileNamePattern> | |
<!-- keep 30 days' worth of history capped at 3GB total size --> | |
<maxHistory>30</maxHistory> | |
<totalSizeCap>3GB</totalSizeCap> |
OlderNewer