Skip to content

Instantly share code, notes, and snippets.

View sergixnet's full-sized avatar

Sergio Peña sergixnet

View GitHub Profile
Estando aquí en Santander,
yo mi poema os relato,
Y quisiera en este rato,
expresar mi admiración,
por tan gran contribución,
de anónimos usuarios,
que sin lucro desarrollan,
WordPress y su base de datos.
La conforman doce tablas,
@tankbar
tankbar / wp-google-tag-manager
Last active January 23, 2024 11:17
Add Google Tag Manager in WordPress with hooks and actions
<?php
/* ADD GTM TO HEAD AND BELOW OPENING BODY */
add_action('wp_head', 'google_tag_manager_head', 20);
function google_tag_manager_head() { ?>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@mike10004
mike10004 / README.md
Last active February 12, 2024 17:52
Reverse Shell Using Python
@Fishrock123
Fishrock123 / gulp.js
Last active August 1, 2021 11:19
gulp & browserify (+watchify +babelify)
var gulp = require('gulp')
var browserify = require('browserify')
var watchify = require('watchify')
var babelify = require('babelify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var merge = require('utils-merge')
@ericelliott
ericelliott / essential-javascript-links.md
Last active May 17, 2024 03:38
Essential JavaScript Links
@bitchwhocodes
bitchwhocodes / gist:1b3297bd3dbf7be93f72
Created December 22, 2014 02:31
Arduino NeoPixels Animation without using Delay
#include <Adafruit_NeoPixel.h>
#define NUM_PIXELS 60
unsigned long interval=50; // the time we need to wait
unsigned long previousMillis=0;
uint32_t currentColor;// current Color in case we need it
uint16_t currentPixel = 0;// what pixel are we operating on
@bitchwhocodes
bitchwhocodes / gist:aa9d3426d35a09ef3918
Created December 22, 2014 02:20
Arduino Avoid Delay
unsigned long interval=50; // the time we need to wait
unsigned long previousMillis=0;
void setup(){
}
void loop(){
if ((unsigned long)(millis() - previousMillis) >= interval) {
previousMillis = millis();
@hubertursua
hubertursua / node-forever-upstart.conf
Last active December 7, 2018 17:53
NodeJS, Forever, and Upstart (Ubuntu)
#!upstart
start on filesystem and started networking
stop on shutdown
expect fork
setuid ubuntu
env HOME="/home/ubuntu"
@mathetos
mathetos / custom_the_content.php
Last active July 17, 2017 09:53
Adding Custom Class to the_content
<?php
//Adding custom class to posts is easy with the post_class filter
add_filter('post_class', 'custom_content_class');
function custom_content_class($classes) {
$classes[] = 'custom_class';
return $classes;
}