Skip to content

Instantly share code, notes, and snippets.

View marbaque's full-sized avatar

marbaque

View GitHub Profile
@marbaque
marbaque / functions.php
Created July 11, 2019 15:14 — forked from taniarascia/functions.php
Inlcuding custom fields and uploads in a WordPress post
<?php
function create_post_your_post() {
register_post_type( 'your_post',
array(
'labels' => array(
'name' => __( 'Your Post' ),
),
'public' => true,
'hierarchical' => true,
@marbaque
marbaque / wp-snapshot-shortcode.php
Created March 21, 2019 00:27 — forked from wpscholar/wp-snapshot-shortcode.php
Shortcode displays snapshots of remote sites on your WordPress site.
<?php
/**
* This shortcode will allow you to create a snapshot of a remote website and post it
* on your WordPress site.
*
* [snapshot url="http://www.wordpress.org" alt="WordPress.org" width="400" height="300"]
*/
add_shortcode( 'snapshot', function ( $atts ) {
$atts = shortcode_atts( array(
@marbaque
marbaque / .gitignore
Created July 22, 2018 22:12 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@marbaque
marbaque / Retina Mixin
Created April 29, 2018 15:54 — forked from dallasbpeters/Retina Mixin
A Sass Mixin for retina images.
@mixin image-2x($image, $width, $height) {
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
/* on retina, use image that's scaled by 2 */
background-image: url($image);
background-size: $width $height;
}
@marbaque
marbaque / ir_sensor_contador.ino
Created March 16, 2018 20:10
código para contar personas con sensores infrarrojos
/*
IR Breakbeam sensor
contador hecho por Alejandro y modificado para usar con IR
*/
#define LEDPIN1 13
#define LEDPIN2 12
#define SENSORPIN1 4
#define SENSORPIN2 5