Skip to content

Instantly share code, notes, and snippets.

@grokdesigns
grokdesigns / ForceVPN.mobileconfig
Last active July 24, 2017 18:16
Force VPN Config
<key>IKEv2</key>
<dict>
***IKEv2 Configuration Info***
<key>OnDemandEnabled</key>
<integer>1</integer>
<key>OnDemandRules</key>
<array>
<dict>
<key>Action</key>
<string>Connect</string>
<key>OnDemandEnabled</key>
<integer>1</integer>
<key>OnDemandRules</key>
<array>
<dict>
<key>Action</key>
<string>Disconnect</string>
<key>DNSServerAddressMatch</key>
<array>
<string>DNS_SERVER_IP</string>
@grokdesigns
grokdesigns / files.conf
Last active April 14, 2017 02:45
Remote Seafile NGINX Proxy
# Files HTTPS Redirect
server
{
listen 80;
server_name HOSTNAME;
return 301 https://HOSTNAME$request_uri;
}
# Files Server Proxy
server
@grokdesigns
grokdesigns / seahub.sh
Created April 14, 2017 02:17
Seahub Change
AROUND LINE 194
function start_seahub_fastcgi () {
before_start;
export SEAFILE_FASTCGI_HOST=0.0.0.0
# Returns 127.0.0.1 if SEAFILE_FASTCGI_HOST is unset or hasn't got any value,
# otherwise returns value of SEAFILE_FASTCGI_HOST environment variable
address=`(test -z "$SEAFILE_FASTCGI_HOST" && echo "127.0.0.1") || echo $SEAFILE_FASTCGI_HOST`
@grokdesigns
grokdesigns / nginx.conf
Last active April 13, 2017 02:04
Atkailash NGINX
server
{
listen 80;
server_name DOMAIN1.COM;
root /usr/local/nginx/html;
index index.php index.html index.htm;
access_log logs/www.access.log;
location ~ \.php$
@grokdesigns
grokdesigns / 000-default.conf
Created May 12, 2016 00:25
NGINX & Apache on Port 80
######## /etc/apache2/sites-enabled/000-default.conf ########
<VirtualHost 10.10.10.90:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@grokdesigns
grokdesigns / index.html
Last active April 9, 2017 08:33
Home Dashboard
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/ico" href="favicon.ico" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/yeti/bootstrap.min.css" /> <!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" /> <!--FontAwesome-->
<link href='//fonts.googleapis.com/css?family=PT+Sans:400' rel='stylesheet' type='text/css'> <!-- Font -->
<link rel="stylesheet" href="css/reset.css"> <!-- CSS reset -->
@grokdesigns
grokdesigns / auth-basic.conf
Created November 8, 2015 23:55
SSL NGINX Reverse Proxy
auth_basic "Restricted Area";
auth_basic_user_file htpasswd;