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
const blocks = [ | |
{ | |
"id":"GZ9oeIry1l", | |
"type":"outlineTopic", | |
"data":{ | |
"text":"Section 1", | |
"level":4, | |
"metadata":{ | |
"id":"f39bfcf5-98e6-47da-a214-84d8d1ac27c7" | |
} |
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 | |
### BEGIN INIT INFO | |
# Provides: vpnclient | |
# Required-Start: $all | |
# Required-Stop: $network $local_fs $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start VPN Client at boot time | |
# chkconfig: 345 44 56 | |
# description: Start VPN Client at boot time. |
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
############################# | |
### GENERATE CERT AND KEY ### | |
############################# | |
# when generating key and cert, use password provided by administrator | |
cd ~/Workspace/Silvermedia/vpn | |
kozak127@callisto:~/Workspace/Silvermedia/vpn$ openssl pkcs12 -in michal.wesoly.p12 -nocerts -nodes -out michal.wesoly.key | |
Enter Import Password: |
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
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y | |
apt-get -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev | |
wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.34-9745-beta/softether-vpnserver-v4.34-9745-beta-2020.04.05-linux-x64-64bit.tar.gz | |
tar xzf softether-vpnserver-v4.34-9745-beta-2020.04.05-linux-x64-64bit.tar.gz && rm softether-vpnserver-v4.34-9745-beta-2020.04.05-linux-x64-64bit.tar.gz | |
cd vpnserver && sudo make | |
cd .. | |
sudo mv vpnserver /usr/local && cd /usr/local/vpnserver/ | |
sudo chmod 600 * |
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
docker network create --driver=bridge localnet | |
docker run --name metabase -p 3333:3000 --network localnet -v metabase_data:/metabase-data -e MB_DB_FILE=/metabase-data/metabase.db -e MUID=$UID -e MGID=$GID -d metabase/metabase | |
docker run --name mysql57 -p 3307:3306 --network localnet -v mysql_data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=openseseme -d mysql/mysql-server:5.7 | |
docker run --name mysql8 -p 3308:3306 --network localnet -v mysql8_data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=openseseme -d mysql/mysql-server | |
docker run --name redis -p 6379:6379 --network localnet -v redis_data:/data -v redis_logs:/logs -d redis --appendonly yes |
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/bash | |
#-- Author: Bhagya Silva (https://about.me/bhagyas) | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
#-- based on original code from : https://gist.github.com/m14t/3056747 | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit |
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 { withRouter } from 'next/router'; | |
import Link from 'next/link'; | |
import React, { Children } from 'react'; | |
const ActiveLink = ({ router, children, ...props }) => { | |
const child = Children.only(children); | |
let className = child.props.className || ''; | |
if (router.pathname === props.href && props.activeClassName) { | |
className = `${className} ${props.activeClassName}`.trim(); |
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' | |
state = { | |
todos : null | |
}, | |
getters = { | |
TODOS : state => { | |
return state.todos; | |
} | |
}, |
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
server { | |
#listen 80; | |
#listen [::]:80; | |
server_name sub.domain.tld; | |
access_log /var/log/sendy/nginx.access.log; | |
error_log /var/log/sendy/nginx.error.log; |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
<IfModule mod_autoindex.c> | |
Options -Indexes | |
</IfModule> | |
RewriteEngine On |
NewerOlder