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
# Guide setup GlobalProtect Portal on Linux | |
## Setup GlobalProtect | |
sudo apt update | |
Download GlobalProtect: https://github.com/jundat95/GlobalProtectVPN/raw/master/PanGPLinux-5.0.8-c6.tgz | |
Go to folder Downloads and Unzip: tar -xvzf PanGPLinux-5.0.8-c6.tgz |
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 axios from 'axios' | |
import * as jwt from 'jsonwebtoken' | |
import NodeRSA from 'node-rsa' | |
const clientID = process.env.APPLE_CLIENT_ID | |
const ENDPOINT_URL = 'https://appleid.apple.com' | |
const TOKEN_ISSUER = 'https://appleid.apple.com' | |
async function getApplePublicKey (): Promise<any> { | |
const url = `${ENDPOINT_URL}/auth/keys` |
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
/* | |
* Copyright (C) 2011 Micah Hainline | |
* Copyright (C) 2012 Triposo | |
* Copyright (C) 2013 Paul Imhoff | |
* Copyright (C) 2014 Shahin Yousefi | |
* Copyright (C) 2015 Stepan Goncharov | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at |
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
var degrees2meters = function(lon,lat) { | |
var x = lon * 20037508.34 / 180; | |
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180); | |
y = y * 20037508.34 / 180; | |
return [x, y] | |
} | |
//test | |
lon= -77.035974 | |
lat = 38.898717 |
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 android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.graphics.Shader; | |
// enables hardware accelerated rounded corners | |
// original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/ |