Add UglifyJS to the project:
npm install --save-dev uglify-js
Run it through a source file, wich name mangling and compression:
node_modules/uglify-js/bin/uglifyjs input-file.js \
# Download source | |
cd /usr/local/src/ | |
wget http://fr2.php.net/get/php-5.5.28.tar.bz2/from/this/mirror --output-document="php-5.5.28.tar.bz2" | |
# Untar to php-5.5.28/ | |
tar xjvf php-5.5.28.tar.bz2 | |
yum install libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel \ | |
libpng-devel freetype-devel gmp-devel mysql-devel ncurses-devel unixODBC-devel \ |
Add UglifyJS to the project:
npm install --save-dev uglify-js
Run it through a source file, wich name mangling and compression:
node_modules/uglify-js/bin/uglifyjs input-file.js \
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
// autoclick the correct squares at 1/10 of a sec... | |
var interval = setInterval(function() { $('iframe').contents().find('.thechosenone').click(); }, 100); | |
// stop whenever you want! | |
clearInterval(interval); |
#!/bin/bash | |
# File name | |
readonly PROGNAME=$(basename $0) | |
# File name, without the extension | |
readonly PROGBASENAME=${PROGNAME%.*} | |
# Arguments | |
readonly ARGS="$@" | |
# Arguments number | |
readonly ARGNUM="$#" |
function getObjProperty(containerObj, str, defaultValueArg) { | |
var defaultValue = typeof defaultValueArg !== 'undefined' ? defaultValueArg : null; | |
try { | |
return _(str.split('.')).reduce(function(obj, key) { | |
return obj[key]; | |
}, containerObj); | |
} catch (e) { | |
return defaultValue; | |
} |
-- From: http://stackoverflow.com/a/9620273 | |
-- Change 'SCHEMA_NAME_HERE' | |
SELECT table_name AS "Tables", | |
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = 'SCHEMA_NAME_HERE' | |
ORDER BY (data_length + index_length) DESC; |
bucket_name="BUCKET_NAME" | |
aws s3api list-objects \ | |
--bucket $bucket_name \ | |
--region `aws s3api get-bucket-location --bucket $bucket_name --output text` \ | |
--output json \ | |
--query "[sum(Contents[].Size), length(Contents[])]" |
#! /usr/bin/python | |
from sys import argv | |
from os.path import exists | |
from os import makedirs | |
from os import symlink | |
from os import system | |
import getopt | |
# |