- Python
- Inkscape (on command line path)
- ImageMagick
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
java -jar war/WEB-INF/lib/htmlcompressor-*.jar \ | |
--type html --recursive --mask '*.jsp;*.html;*.tag;*.htm' \ | |
--compress-css --compress-js --js-compressor closure \ | |
--remove-intertag-spaces --remove-quotes \ | |
--preserve-server-script -p regex.txt \ | |
-o war/ war/ 2> /dev/null |
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
<div id="fb-root"></div> | |
<script>(function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); js.id = id; | |
js.src = "http://connect.facebook.net/pt_BR/all.js#xfbml=1"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk'));</script> |
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
#!/usr/bin/env python | |
## Copyright (c) 2009 Andrew D. Straw | |
## Permission is hereby granted, free of charge, to any person obtaining a copy | |
## of this software and associated documentation files (the "Software"), to deal | |
## in the Software without restriction, including without limitation the rights | |
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
## copies of the Software, and to permit persons to whom the Software is | |
## furnished to do so, subject to the following conditions: |
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
<script>document.documentElement.className = 'js '+ (!!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect ? 'svg':'nosvg')</script> |
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
/* | |
AMD-compatible async 'define' modularization. | |
Contains only the 'define' module syntax compatible with the official API | |
and a flexible dependency resolver with no restrictions on how you load your files. | |
This implementation doesn't load your JS files so you have to do it. You can bundle | |
one big file, load multiple files, load them asynchronously, out of order, your call. | |
(doesn't include the 'require' and 'requirejs' objects) |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
uglify: { | |
'build/teste.js': 'src/teste.js' | |
}, | |
less: { | |
'build/estilo.css': ['src/*.less'] | |
} | |
}); |
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
javascript:document.querySelector('meta[name=viewport]').setAttribute('content','width=device-width,initial-scale=1,maximum-scale=10,user-zoom=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
function load(url) { | |
var scripts = document.getElementsByTagName('script')[0] | |
var script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); | |
} | |
load('//apis.google.com/js/plusone.js'); | |
load('//platform.twitter.com/widgets.js'); | |
load('//s.widgetsite.com/widget.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
function autogrow(textarea) { | |
// create fake div with same content | |
// (only works with box-sizing border-box) | |
var dv = document.createElement("div"); | |
dv.className = 'fm-growable'; | |
dv.style.visibility="hidden"; | |
dv.style.position="absolute"; | |
textarea.parentNode.appendChild(dv); | |