Skip to content

Instantly share code, notes, and snippets.

View rictorres's full-sized avatar
💅
startuppin'

Ricardo Torres rictorres

💅
startuppin'
View GitHub Profile
@rictorres
rictorres / gist:3106467
Created July 13, 2012 18:24 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@rictorres
rictorres / trigram.html
Created September 10, 2012 03:56 — forked from tkadlec/trigram.html
Trigram for heaven icon
<html>
<head>
<title>Trigram for heaven icon</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<style type="text/css">
li {
list-style-type: none;
}
#menu{
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);
# ~/.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;
<?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';
/*
* 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 ){
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is free to use by anyone (MIT, blabla).
// Author: rkorving@wizcorp.jp
var timeouts = {};
var intervals = {};
/*
* Minimal classList shim for IE 9
* By Devon Govett
* MIT LICENSE
*/
if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {
Object.defineProperty(HTMLElement.prototype, 'classList', {
get: function() {
@rictorres
rictorres / letsencrypt_2018.md
Created June 18, 2018 20:45 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files: