Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
#!/bin/bash | |
# Recursive file convertion windows-1251 --> utf-8 | |
# Place this file in the root of your site, add execute permission and run | |
# Converts *.php, *.html, *.css, *.js files. | |
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command | |
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | | |
while read file | |
do |
http://wiki.nginx.org/HttpLuaModule#Installation
install LuaJIT
$ brew install luajit
download ngx_devel_kit
- certain endpoints are always blocked | |
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then | |
ngx.exit(403) | |
end | |
-- import requirements | |
local cjson = require "cjson" | |
-- setup some app-level vars | |
local app_id = "APP_ID" |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
#!/bin/bash | |
if [ "$#" -ne "1" ]; then | |
echo "Usage: $0 package_list" | |
exit 1 | |
fi | |
cat $1 | xargs -I {} bash -c "echo {}; brew deps {}" | sort | uniq > /tmp/brew_keep | |
comm -23 <(brew list -1 | sort) <(cat /tmp/brew_keep) > /tmp/brew_rm | |
lines=$(cat /tmp/brew_rm | wc -l | sed -e 's/ //g') |
/** | |
* Module dependencies | |
*/ | |
// nothing yet | |
/** | |
* Constantes | |
*/ | |
var PREFIXES = ["webkit", "moz", "ms"] |
import setupCSS from './load-css-require.js' | |
setupCSS(__dirname, (err) => { | |
if (err) throw err | |
require('my-front-end-components-that-require-css-files.js') | |
}) |
# Bash function to send email via Gmail SMTP | |
# sendEmail [subject] [toEmail] [message] (optional attachment path) | |
function sendEmail(){ | |
if (($# < 3 )) | |
then | |
echo "" | |
echo "Usage:" | |
echo "sendEmail [subject] [toEmail] [message] (optional attachment path)" | |
echo "" | |
exit 1 |