$ touch /usr/share/applications/robomongo.desktop
$ vim /usr/share/applications/robomongo.desktop
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading | |
# slashes. | |
# If your page resides at | |
# http://www.example.com/mypage/test1 | |
# then use | |
# RewriteBase /mypage/test1/ | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f |
const http = require("http"), | |
fs = require("fs"), | |
path = require("path"), | |
log = console.log; | |
//this will response with file type with specifiq content and encode | |
function response(res, file, contentType, encode) { | |
if (file != "404") { | |
res.writeHead(200, { "Content-type": contentType }); | |
if (encode) { |
function check(numbers:number[], value: number): number[] { | |
const needMap:any = {}; | |
const result: number[] = []; | |
let round = 0; | |
numbers.every((n, index) => { | |
round ++; | |
if(needMap[n] > -1) { | |
result.push(...[numbers[needMap[n]], n]); |
This document copied from https://gist.github.com/abdallahokasha/37911a64ad289487387e2d1a144604ae
here.
wget
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowViewAccountInfo", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:GetAccountPasswordPolicy", | |
"iam:GetAccountSummary", | |
"iam:ListVirtualMFADevices", |
import { Observable, Subject, from, throwError } from 'rxjs'; | |
import { map, catchError, tap, switchMap } from 'rxjs/operators'; | |
import { Injectable } from '@angular/core'; | |
import { HttpClient, HttpErrorResponse } from '@angular/common/http'; | |
import { AuthService } from 'ngx-auth'; | |
import { TokenStorage } from './token-storage.service'; | |
import { UtilsService } from '../services/utils.service'; | |
import { AccessData } from './access-data'; | |
import { Credential } from './credential'; |
// src/app/services/token-interceptor.service.ts | |
import { Injectable } from "@angular/core"; | |
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from "@angular/common/http"; | |
import { AuthenticationService } from "../authentication.service"; | |
import { Observable } from "rxjs/Observable"; | |
import { BehaviorSubject } from "rxjs/BehaviorSubject"; | |
@Injectable() | |
export class RefreshTokenInterceptor implements HttpInterceptor { |
license: mit |
import { Request, Response } from "express"; | |
import { successResponse } from "../../Helpers/Responses/successResponse"; | |
import { ApiConfig } from "../../Configs/Api.Config"; | |
import { errorResponse } from "../../Helpers/Responses"; | |
const { OAuth2Client } = require("google-auth-library"); | |
const { google } = require("googleapis"); | |
export default async function googleLogin(request: Request, response: Response) { | |
console.log(ApiConfig.THIRD_PARTY_LOGIN_API.GOOGLE.SCOPES); |