Skip to content

Instantly share code, notes, and snippets.

@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
@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;
}
@christopher-baek
christopher-baek / .Configure ddclient with Namecheap.md
Last active April 20, 2023 21:21
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
@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);
}
@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");
*/
@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
@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
@zosiu
zosiu / xdg-open
Created December 5, 2013 21:06
Patched /usr/bin/xdg-open script for Lubuntu to open magnet and sublime links.
#!/bin/sh
#---------------------------------------------
# xdg-open
#
# Utility script to open a URL in the registered default application.
#
# Refer to the usage() function below for usage.
#
# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
@joshhartman
joshhartman / mcrypt-cbc.php
Last active April 20, 2022 08:44
Rijndael 256-bit Encryption Function (CBC)
<?php
// Define a 32-byte (64 character) hexadecimal encryption key
// Note: The same encryption key used to encrypt the data must be used to decrypt the data
define('ENCRYPTION_KEY', 'd0a7e7997b6d5fcd55f4b5c32611b87cd923e88837b63bf2941ef819dc8ca282');
// Encrypt Function
function mc_encrypt($encrypt, $key){
$encrypt = serialize($encrypt);
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);
$key = pack('H*', $key);