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
@queued
queued / index.php
Last active July 13, 2023 07:49
Simple and intuitive email class (using the native mail function from PHP)
<?php
require 'mailer.php';
$message = <<<MSG
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
MSG;
// Creates a new mailer instance and enable mail greeting
$mailer = new Mailer(true);
@queued
queued / revision.md
Created September 21, 2013 00:50
L2J Eternity revision milestones -- to-do list -- done progress

Current nightly revision

  • Core: 1
  • Datapack: 1

Current stable revision

  • Core: 1
  • Datapack: 1
@queued
queued / Santrium.PlayerActions.pas
Last active December 28, 2015 01:09
Unit problemática
unit Santrium.PlayerActions;
{$WARNINGS OFF} // No, you're not the only one who hates to use this...
interface
uses
System.SysUtils, Winapi.Windows, System.Win.Registry, Vcl.Dialogs,
Santrium.Utils.Notify;
@queued
queued / 0_reuse_code.js
Created December 20, 2013 13:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@queued
queued / Windows Update.md
Last active January 1, 2016 20:29
Soluções que resolvem o Windows Update quando o mesmo está consumindo mais de 50% do processador no processo svchost.exe.

Soluções do Windows Update

  1. Instalar certificados de raiz de Nov. 2013.
  2. Re-join na máquina de domínio.
  3. Fix-it 50777.
  4. Renomear/Apagar a pasta C:\Windows\SoftwareDistribution, apagando assim, o cache do WU.
  5. Caso o passo anterior não funcione, fazer pela linha de comando (próximo arquivo).
  6. Desativar o MU (Microsoft Update)

Soluções mais efetiva

<?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>
@queued
queued / array.php
Last active January 4, 2016 02:59
Dúvida - PHP Brasil
<?php
$array = ['Hello', 'Índice 1', 'Índice 2'];
$var1 = array_pop($array); // índice 2
$var2 = array_pop($array); // índice 1

Animate the transformation of a mobile menu toggle into a cross

Animation 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/7/

Annotations:

  • the animation uses four additional elements inside the a tag. This is not semantic, but at 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
  • inTop/outTop, inMiddle/outMiddle and inBottom/outBottom are the same animation. This seemed to be the only way to 'restart' the animation.
  • Adding 180deg looks even better ;) but is a bit laggy sometimes :/
public function timeAgo(\Datetime $then)
{
$now = new \Datetime('now');
$interval = $then->diff($now);
$points = array(
'y' => array('year', 'years'),
'm' => array('month', 'months'),
'd' => array('day', 'days'),
@queued
queued / LINK.txt
Created May 15, 2016 18:28
Ertheia client download link