Skip to content

Instantly share code, notes, and snippets.

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

Alfredo Hinojosa alfhh

🏠
Working from home
View GitHub Profile
@alfhh
alfhh / xmapp-replace-mariadb-with-mysql.md
Created November 14, 2017 15:36 — forked from odan/xmapp-replacing-mariadb-with-mysql.md
XAMPP - Replace MariaDB with MySQL

XAMPP - Replace MariaDB with MySQL

Since XAMPP 5.5.30 and 5.6.14, XAMPP ships MariaDB instead of MySQL. MariaDB is not 100% compatible with MySQL and can be replaced with the "orginal" MySQL server.

Backup

  • Backup the old database into a sql dump file
  • Stop the MariaDB service
  • Rename the folder: c:\xampp\mysql to c:\xampp\mariadb
@alfhh
alfhh / media-query.css
Created October 25, 2017 17:50 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@alfhh
alfhh / media-query.css
Created October 25, 2017 17:49 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@alfhh
alfhh / ga-video.js
Created July 10, 2017 20:17 — forked from kyleridolfo/ga-video.js
HTML5 Video Tracking for Google Tag Manager
<script>
// Let's wrap everything inside a function so variables are not defined as globals
(function(){
// This is gonna our percent buckets ( 10%-90% )
var divisor = 10;
// We're going to save our players status on this object.
var videos_status = {};
// This is the funcion that is gonna handle the event sent by the player listeners
function eventHandler(e){
switch(e.type) {
@alfhh
alfhh / jc.sh
Created January 10, 2017 15:59
Bash file to create, compile and run Java files in one line
#!/bin/bash
# The name of the file is passed as parameter by $1
ext='.java'
file=$1$ext
if [ -f $file ];
then
javac $file
java $1
@alfhh
alfhh / customTag.html
Last active November 25, 2016 17:28
A basic example of Custom HTML Tag. GTM
<script type="text/javascript">
(function() {
var eventsNames = [];
for (var i = dataLayer.length - 1; i >= 0; i--) {
eventsNames.push(dataLayer[i].event);
}
dataLayer.push({
@alfhh
alfhh / iterm2-solarized.md
Created November 2, 2016 01:38 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)

Solarized

----- Mejor = 8.000000 Rutas, 2274.384690 Tiempo -----
Intentos = 8834 --
Temperatura = 0.000094
Rutas:
{
[1,1] =
64 70 26 39 22 4 99 37 92 48 62 32
@alfhh
alfhh / atoi C
Last active August 29, 2015 14:15
Implementation of atoi function in C.
int atoi(char *s) {
int acum = 0;
while((*s >= '0')&&(*s <= '9')) {
acum = acum * 10;
acum = acum + (*s - 48);
s++;
}
return (acum);
}