This file contains hidden or 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 type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
This file contains hidden or 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 type="text/javascript"> | |
(function (css_href) { | |
"use strict"; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); | |
} else if (el.attachEvent) { | |
el.attachEvent("on" + ev, callback); |
This file contains hidden or 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
<?php | |
/** | |
* GitHub webhook handler template. | |
* | |
* @see https://docs.github.com/webhooks/ | |
* @author Miloslav Hůla (https://github.com/milo) | |
*/ | |
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check |
This file contains hidden or 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
/** | |
* Make sure Graphicsmagick is installed on your system | |
* osx: brew install graphicsmagick | |
* ubuntu: apt-get install graphicsmagick | |
* | |
* Install these gulp plugins | |
* glup, gulp-image-resize, gulp-imagemin and imagemin-pngquant | |
* | |
* Group images according to their output dimensions. | |
* (ex: place all portfolio images into "images/portfolio" |
This file contains hidden or 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
<?php | |
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
// http://youtu.be/dQw4w9WgXcQ | |
// http://www.youtube.com/embed/dQw4w9WgXcQ | |
// http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
// http://www.youtube.com/?v=dQw4w9WgXcQ | |
// http://www.youtube.com/v/dQw4w9WgXcQ | |
// http://www.youtube.com/e/dQw4w9WgXcQ | |
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
This file contains hidden or 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
ssl_session_cache shared:ssl_session_cache:10m; | |
server { | |
server_name domen.com www.domen.com; | |
listen xxx.xxx.xxx.xxx:80; | |
return 301 https://domen.com$request_uri; | |
} | |
server { | |
server_name domen.com www.domen.com; | |
listen 443 ssl spdy; |
This file contains hidden or 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
.css3-radios label { | |
display: inline-block; | |
vertical-align: middle; | |
} | |
.css3-radios input[type="radio"] + span { | |
display: inline-block; | |
vertical-align: middle; | |
} | |
.css3-radios input[type="radio"] + span::before { | |
display: inline-block; |
This file contains hidden or 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
<?php | |
exec("find /var/www/FOLDER/img/ -type f -name '*.jpg' -exec jpegoptim --strip-all {} \;"); | |
exec("find /var/www/FOLDER/img/ -type f -name '*.JPG' -exec jpegoptim --strip-all {} \;"); // Sometimes, .jpg are.. .JPG | |
exec("find /var/www/FOLDER/img/ -type f -name '*.png' -exec optipng -o2 {} \;"); // Level 2, change to -o2 => -o7 | |
mail('[email protected]', 'Server', 'Jpg/Png opti done'); | |
?> |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
update_version(){ | |
if [[ "$DONT_BUMP_VERSION" -ne "1" ]] | |
then | |
echo " Bumping version.. " | |
else | |
echo "Version will not be bumped since variable DONT_BUMP_VERSION is set." | |
exit 0 |
This file contains hidden or 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
<form #loginForm="ngForm"> | |
<ion-item> | |
<ion-label floating>CPF/CNPJ</ion-label> | |
<ion-input [(ngModel)]="cpf_cnpj" (blur)="cpf_cnpj = format(cpf_cnpj)" name="cpf_cnpj"></ion-input> | |
</ion-item> | |
<button ion-button full type="submit" color="sicor" (tap)="login(signForm.value)">Login</button> | |
</form> |