Skip to content

Instantly share code, notes, and snippets.

View avatsaev's full-sized avatar

Aslan Vatsaev avatsaev

View GitHub Profile
{
"post":{
"_id":"5f100314c8117b0e2364a2ee",
"categoryID":"5f100c59d7c929469b8db769",
"commentCount":1,
"deleted":false,
"details":"sadadad",
"eta":"2020-12-01T00:00:00.000Z",
"etaPublic":true,
"imageURLs":[
sudo apt update
sudo apt install build-essential curl wget git zsh ffmpeg
curl -fsSL https://get.docker.com | sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
curl -sSL https://gist.githubusercontent.com/avatsaev/39526caf8f5dc70b292427f9caeaad26/raw/aac723ead2c41962d592275aa56151fe7ae3da16/.zshrc-ubuntu > ~/.zshrc
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
sudo usermod -aG docker $USER
# -*- 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"
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
browserNoActivityTimeout: 50000,
browserDisconnectTolerance: 2,
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
image: node:8.9.0
stages:
- setup
- build
- tests
npm-install:
stage: setup
script:
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
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])
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){}
<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 ">
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']