Skip to content

Instantly share code, notes, and snippets.

View queued's full-sized avatar
🏠
Working from home

All Unser Miranda queued

🏠
Working from home
  • Viçosa, Minas Gerais - Brasil
View GitHub Profile
@xeoncross
xeoncross / timezone.php
Created September 8, 2011 18:43
The perfect TimeZone selectbox list for PHP 5.3+
<?php
$regions = array(
'Africa' => DateTimeZone::AFRICA,
'America' => DateTimeZone::AMERICA,
'Antarctica' => DateTimeZone::ANTARCTICA,
'Aisa' => DateTimeZone::ASIA,
'Atlantic' => DateTimeZone::ATLANTIC,
'Europe' => DateTimeZone::EUROPE,
'Indian' => DateTimeZone::INDIAN,
'Pacific' => DateTimeZone::PACIFIC
@lisachenko
lisachenko / SplClassLoader.php
Created November 3, 2011 06:13 — forked from jwage/SplClassLoader.php
PSR-0 SplClassLoader
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@xeoncross
xeoncross / index.php
Created March 8, 2012 17:31
Tiny, SMTP client in PHP
<?php
/*
This is a very tiny proof-of-concept SMTP client. Currently it's over 320 characters (if the var names are compressed). Think you can build one smaller?
*/
ini_set('default_socket_timeout', 3);
$user = 'you@gmail.com';
$pass = '';
$host = 'ssl://smtp.gmail.com';
@theconektd
theconektd / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@xeoncross
xeoncross / README.md
Created August 15, 2012 16:13 — forked from jbroadway/Slimdown.md
Slimdown - A simple regex-based Markdown parser.

Slimdown

A very basic regex-based Markdown parser. Supports the following elements (and can be extended via Slimdown::add_rule()):

  • Headers
  • Links
  • Bold
  • Emphasis
  • Deletions
@openprojdev
openprojdev / gist:6105277
Created July 29, 2013 15:43
Auto versioning of static file based on unix mtime
<?php
/*
* .htaccess
* <IfModule mod_rewrite.c>
* RewriteEngine on
* RewriteCond %{REQUEST_FILENAME} !-d
* RewriteCond %{REQUEST_FILENAME} !-f
* RewriteRule ^(.*)\.(.+)\.(css|js)$ $1.$3 [L] # Strip out the version number
* </IfModule>
@tillsanders
tillsanders / menu-toggle-button-animation.md
Last active March 21, 2016 12:42
Animation for a mobile menu toggle. Three horizontal lines transform into a cross and back again.

Animate the transformation of a mobile menu toggle into a cross

Animation Transition for a mobile menu toggle. Three horizontal lines transform into a cross and back again. The top and bottom lines fall into the center, transforming into one line. The line(s) rotate clockwise, spawning a line at 45deg and stop at 135 deg, forming a cross. Demo: http://jsfiddle.net/SYYr5/84/

Annotations:

  • the animation uses four additional elements inside the a tag. This is not semantic, but we can at least use elements without a semantic meaning, like div and span
  • using a div as a second container, we are able to apply a padding to our a tag
  • We may need to use vendor prefixes :/
@goodjob1114
goodjob1114 / hhvm-nginx-mariadb-installMemoOnUbuntu14.04.md
Last active July 5, 2019 16:27
hhvm, nginx, php, mariadb -> [laravel] install memo used on Ubuntu 14.04

ubuntu 14.04

sysv-rc-conf (service control tool)

sudo apt-get install -y sysv-rc-conf

nginx

sudo add-apt-repository -y ppa:nginx/stable 
@vedovelli
vedovelli / deploy_app_laravel_digital_ocean
Last active February 10, 2023 18:55
Deploy app Laravel no Digital Ocean
1. Crie uma conta no Digital Ocean;
2. Crie um droplet Ubuntu (estas instruções são baseadas em Ubuntu)
3. Escolha o pacote LEMP para ser instalado com seu Ubuntu
4. Escolha ou associa sua chave publica para acesso ao servidor
5. Acesse seu server usando SSH (ssh root@<ip informado pelo DO>)
@rafaelrinaldi
rafaelrinaldi / index.html
Created December 21, 2015 14:55
iOS toggle indicator written in pure CSS. See it in action: https://jsbin.com/harule
<label class="toggle">
<input type="checkbox" class="toggle-phony"/>
<span class="toggle-indicator"></span>
</label>