View mac-docker-proxy.pac
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
function FindProxyForURL(url, host) { | |
if (isInNet(host, "172.17.0.0", "255.255.0.0")) { | |
return "SOCKS5 127.0.0.1:8888"; | |
} | |
if (isInNet(host, "193.0.0.0", "255.0.0.0")) { | |
return "SOCKS5 127.0.0.1:8888"; | |
} | |
return "DIRECT"; | |
} |
View cors.inc
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
more_set_headers "Access-Control-Allow-Origin: $http_origin"; | |
more_set_headers "Access-Control-Allow-Credentials: true"; | |
# OPTIONS indicates a CORS pre-flight request | |
if ($request_method = 'OPTIONS') { | |
more_set_headers "Access-Control-Max-Age: 1728000"; | |
more_set_headers "Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, OPTIONS"; | |
more_set_headers "Access-Control-Allow-Headers: Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since"; | |
more_set_headers "Content-Length: 0"; |
View node-js-mailgun-via-request-api.js
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
// node.js : Mailgun via API | |
var request = require('request') | |
var apiBaseUrl = 'https://api.mailgun.net/v3/YOUR_DOMAIN_NAME'; // REPLACE THIS BY YOUR DOMAIN NAME | |
var apiKey = 'key-YOUR_API_KEY'; // REPLACE THIS BY YOUR API KEY | |
var from = 'Excited User'; | |
var to = 'example@example.com'; | |
var subject = 'Hello'; | |
var text = 'Testing some Mailgun awesomness!'; |
View parser-server-node-js-mailgun-via-request-api.js
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
// node.js : Mailgun via API | |
var request = require('request') | |
Parse.Cloud.define("sendemail", function(req, res) { | |
var apiBaseUrl = 'https://api.mailgun.net/v3/YOUR_DOMAIN_NAME'; // REPLACE THIS BY YOUR DOMAIN NAME | |
var apiKey = 'key-YOUR_API_KEY'; // REPLACE THIS BY YOUR API KEY | |
var from = 'Excited User'; | |
var to = 'example@example.com'; | |
var subject = 'Hello'; |
View gist:85fd9b3b34bfc584a214bd1168cfd7d1
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
# first install FFMPEG | |
brew install ffmpeg $(brew options ffmpeg | grep -vE '\s' | grep -- '--with-' | tr '\n' ' ') | |
# find and compress | |
find . -iname "*.mp4" | xargs -I {} ffmpeg -i {} -vcodec libx264 -crf 40 -acodec aac -threads 0 {}_compressed.mp4 | |
# ignore already compressed | |
find . -type f \( -iname "*.mp4" ! -iname "*compressed*" \) | xargs -I {} ffmpeg -i {} -vcodec libx264 -crf 40 -acodec aac -threads 0 {}_compressed.mp4 |
View 1.google-analytics-proxy-nginx.conf
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; | |
server_name your.domain.com; | |
location = /analytics.js { | |
# you have to compile nginx with http://nginx.org/en/docs/http/ngx_http_sub_module.html (this is not default) | |
# and http://nginx.org/en/docs/http/ngx_http_proxy_module.html (it's a default module) | |
proxy_set_header Accept-Encoding ""; |
View index.html
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta content="Back4App Inc" name="author"> | |
<title>Sample App| JavaScript Quickstart | Back4App</title> | |
View index.hml
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta content="Back4App Inc" name="author"> | |
<title>Sample App| JavaScript Quickstart | Back4App</title> | |
View gist:913799cc084db131addc
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 su and run the following | |
sudo apt-get update && \ | |
sudo apt-get -y upgrade && \ | |
# install all dependencies | |
sudo apt-get -y install \ | |
build-essential \ | |
checkinstall \ | |
gcc \ |
View httpd.conf
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
<FilesMatch "\.*$"> | |
ExpiresActive On | |
ExpiresDefault A1 | |
Header append Cache-Control must-revalidate | |
</FilesMatch> | |
RewriteEngine On | |
# RewriteCond %{HTTP_HOST} !^$ | |
RewriteRule ^/rest/(.*)$ http://localhost:8080/doccon-view/rest/$1 [R,L] # Temporary Move |