Skip to content

Instantly share code, notes, and snippets.

Aslan Vatsaev avatsaev

Block or report user

Report or block avatsaev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "williamyeh/ubuntu-trusty64-docker"
config.vm.hostname = "swarm-node-1"
config.vm.network "public_network", bridge: "eth1"
View angular_karma_config_for_headless_testing.js
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
browserNoActivityTimeout: 50000,
browserDisconnectTolerance: 2,
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
View gitlab_ci_for_angular.yml
image: node:8.9.0
stages:
- setup
- build
- tests
npm-install:
stage: setup
script:
View bundle.min.js
var _0x4302=["\x4B\x43","\x75\x69\x2E\x72\x6F\x75\x74\x65\x72","\x75\x69\x2E\x62\x6F\x6F\x74\x73\x74\x72\x61\x70","\x6E\x67\x54\x6F\x75\x63\x68","\x6E\x67\x44\x69\x61\x6C\x6F\x67","\x6E\x67\x41\x6E\x69\x6D\x61\x74\x65","\x75\x69\x2E\x65\x76\x65\x6E\x74","\x75\x69\x2E\x6B\x65\x79\x70\x72\x65\x73\x73","\x6D\x6F\x64\x75\x6C\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x73\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x24\x73\x63\x6F\x70\x65","\x24\x72\x6F\x6F\x74\x53\x63\x6F\x70\x65","\x24\x73\x74\x61\x74\x65\x50\x61\x72\x61\x6D\x73","\x24\x73\x74\x61\x74\x65","\x55\x73\x65\x72","\x53\x6F\x63\x6B\x65\x74","\x69\x73\x5F\x65\x6D\x70\x74\x79","\x67\x65\x6E\x65\x72\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x64","\x68\x6F\x73\x74\x6E\x61\x6D\x65","\x2D","\x6A\x6F\x69\x6E","\x6E\x61\x6D\x65","\x65\x6D\x69\x74","\x24\x64\x65\x73\x74\x72\x6F\x79","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x5F\x6C\x69\x73\x74\x65\x6E\x65\x72","\x65\x72\x72","\x63\x68\x61\x74","\x61\x70\x70\x65\x6E\x64\x5F
View placer.py
import math
import sys
import time
import random
import requests
from PIL import Image
from requests.adapters import HTTPAdapter
img = Image.open(sys.argv[1])
View auth.guard.ts
import { Injectable } from '@angular/core';
import {CanActivate, Router} from "@angular/router";
import {Angular2TokenService} from "angular2-token";
@Injectable()
export class AuthGuard implements CanActivate {
constructor(private authTokenService:Angular2TokenService,
private router:Router){}
View profile.component.html
<div class="row">
<div class="col l8 s12 offset-l2">
<div class="card blue-grey lighten-5 z-depth-4" style="margin-top: 5em">
<div class="card-content">
<div style="margin-bottom: 0" class="row ">
View profile.component.ts
import { Component, OnInit } from '@angular/core';
import {Router} from "@angular/router";
import {AuthService} from "../services/auth.service";
import {Angular2TokenService} from "angular2-token";
@Component({
selector: 'app-profile',
templateUrl: './profile.component.html',
styleUrls: ['./profile.component.sass']
View login-form.component.ts
import {Component, OnInit, Output, EventEmitter} from '@angular/core';
import {AuthService} from "../services/auth.service";
@Component({
selector: 'app-login-form',
templateUrl: './login-form.component.html',
styleUrls: ['./login-form.component.sass']
})
export class LoginFormComponent implements OnInit {
View toolbar.component.html
<!--Navigation-->
<div class="navbar-fixed">
<nav role="navigation">
<div class="nav-wrapper blue ">
<a [routerLink]="['']" id="logo-container" class="brand-logo">Rails & Angular Auth</a>
<ul class="right hide-on-med-and-down">
You can’t perform that action at this time.