Skip to content

Instantly share code, notes, and snippets.

View enlacee's full-sized avatar

Anibal enlacee

View GitHub Profile
@happycollision
happycollision / Vagrantfile
Created January 17, 2014 06:48
A nice little Vagrantfile that spins up a MySQL server and loads in the data from your .sql file sitting next to it.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This Vagrantfile (vagrantup.com) spins up a MySQL server with your data
# already loaded. Many of the settings below are the same suggestions you get
# from `vagrant init`.
#
# Just be sure that (if you want data loaded) you have your .sql file sitting
# in the directory that will be shared to the guest. Usually this is the folder
# that your Vagrantfile is in. The database and user will have the same name as
@enlacee
enlacee / query_date.sql
Created May 3, 2014 09:30
MYSQL DATE : filtro por intervalo desde ahora hasta hace 1 dia.
-- Filtro por intervalo desde ahora hasta hace 1 dia
SELECT
slots.slot,
slots.name,
slots.min,
slots.max,
AVG(datos.valor) valor
FROM slots
@enlacee
enlacee / ModuleZF2.php
Created April 7, 2015 23:52
ZF2 Configuration of helper for VIEW AND CONTROLLER : module.php
<?PHP
/*
* Return url purify (URL clean for SEO)
* This function is posible call for:
* // CONTROLLER
* $utilFunction = $this->helper->get('utilFunction');
*
* // VIEW
* $utilFunction = $this->plugin("utilFunction");
*/
@alizhdanov
alizhdanov / scrollTop.js
Created August 21, 2016 20:03
pure javascript scrollTop function
function scrollTo(element, to, duration) {
if (duration < 0) return;
var difference = to - element.scrollTop;
var perTick = difference / duration * 2;
setTimeout(function() {
element.scrollTop = element.scrollTop + perTick;
scrollTo(element, to, duration - 2);
}, 10);
}
@christopher-baek
christopher-baek / .Configure ddclient with Namecheap.md
Last active September 2, 2025 11:34
Configure ddclient withNamecheap

Configure ddclient with Namecheap

Namecheap Configuration

  1. Click the Manage button next to the domain in the Domain List view
  2. In the Domain tab, scroll down and remove any entries in the Redirect Domain list
  3. In the Advanced DNS tab...
  4. Turn on Dynamic DNS and make a note of the password
  5. Add an A Record for @ pointing to 127.0.0.1
@enlacee
enlacee / set-scroll-conten-jquery.js
Created August 29, 2017 22:30
hacer scroll con el tamaño de cabecera
function getHeightHeader() {
var height = 0;
if ($('.header-page').length === 1) {
$headerPage = $('.header-page');
if ($headerPage.css('position') === 'fixed') {
height = $headerPage.height();
}
}
return height;
}
@molcik
molcik / free-photoshop.md
Created May 18, 2018 08:39
Modify Photoshop to never ending trial

How Does It Work

All you have to do, to extend your trial period, is change number in TrialKey element in application.xml. This file is located in /Library/Application Support/Adobe/Adobe Photoshop/AMT. You can navigate there with this command:

cd /Library/Application\ Support/Adobe/Adobe\ Photoshop\ */AMT

Then you have to open the file and edit it. You can use just TextEdit app.

open -a TextEdit application.xml