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
# ~/.osx — http://mths.be/osx | |
# root check | |
if [[ $EUID -ne 0 ]]; then | |
echo "################################"; | |
echo "## YOU ARE NOT RUNNING AS ROOT #"; | |
echo "################################"; | |
echo "#"; | |
echo "# USAGE: sudo $0"; | |
exit; |
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
<?php | |
$db = new mysqli('host', 'user', 'pass', 'bd'); | |
$sql = "SELECT comment_author_email, comment_author | |
FROM `wp_comments` | |
WHERE comment_author_email <> '' | |
GROUP BY comment_author_email | |
ORDER BY ( | |
comment_author_email |
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:void((function()%7Bvar d%3Ddocument%3Bd.write(%27<!DOCTYPE html><html><head><meta charset%3D"UTF-8"><title>%27%2Bd.title%2B%27 - Responsive test</title><link rel%3D"stylesheet" href%3D"http://responsive.victorcoulon.fr/assets/css/app.css"><script src%3D"http://responsive.victorcoulon.fr/assets/js/app.min.js"></script></head><body><header><div class%3D"close"><a href%3D"%23">×</a></div><div id%3D"size"></div><div class%3D"keyboard"><a href%3D"%23">I</a></div><div class%3D"cssrefresh"><a href%3D"%23">I</a></div><div id%3D"devices"><a href%3D"%23" class%3D"tablet-portrait"><span>Tablet Portrait</span></a><a href%3D"%23" class%3D"tablet-landscape"><span>Tablet Landscape</span></a><a href%3D"%23" class%3D"smartphone-landscape"><span>iPhone Landscape</span></a><a href%3D"%23" class%3D"smartphone-portrait"><span>iPhone Portrait</span></a><a href%3D"%23" class%3D"auto active"><span>Auto</span></a></div></header><section><div id%3D"wrapper"><iframe src%3D"%27%2Bd.URL%2B%27" onLoad%3D"resbook.changeUrl(this. |
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
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* STYLES GO HERE */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
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
var imageAddr = "http://www.tranquilmusic.ca/images/cats/Cat2.JPG" + "?n=" + Math.random(); | |
var startTime, endTime; | |
var downloadSize = 5616998; | |
var download = new Image(); | |
download.onload = function () { | |
endTime = (new Date()).getTime(); | |
showResults(); | |
} | |
startTime = (new Date()).getTime(); | |
download.src = imageAddr; |
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
.declaration-order { | |
/* Positioning */ | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
z-index: 100; |
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
<?php | |
class Cidades_estados_pais extends CI_Model { | |
public function index() { | |
//----------------------------------------------- | |
// Se preferir altere o nome da tabela e colunas | |
// | |
$tabela = 'sys_cidades_estados_pais'; |
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
'use strict'; | |
module.exports = function(grunt) { | |
// load all grunt tasks | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
// configurable paths | |
var projectConfig = { | |
dev: 'dev', |
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(document,navigator,standalone) { | |
// prevents links from apps from oppening in mobile safari | |
// this javascript must be the first script in your <head> | |
if ((standalone in navigator) && navigator[standalone]) { | |
var curnode, location=document.location, stop=/^(a|html)$/i; | |
document.addEventListener('click', function(e) { | |
curnode=e.target; | |
while (!(stop).test(curnode.nodeName)) { | |
curnode=curnode.parentNode; | |
} |
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
/* | |
* Normalized hide address bar for iOS & Android | |
* (c) Scott Jehl, scottjehl.com | |
* MIT License | |
*/ | |
(function( win ){ | |
var doc = win.document; | |
// If there's a hash, or addEventListener is undefined, stop here | |
if( !location.hash && win.addEventListener ){ |