Skip to content

Instantly share code, notes, and snippets.

View luistinygod's full-sized avatar
🎯
Focusing

Luis Godinho luistinygod

🎯
Focusing
  • Porto, Portugal
View GitHub Profile
@royboy789
royboy789 / guten-vue.js
Created January 17, 2018 00:38
This is a Gutenberg Block built with Vue.js
( function( wp ) {
var el = wp.element.createElement;
var __ = wp.i18n.__;
wp.blocks.registerBlockType( 'learn-gutenberg/ex2-vue', {
title: __( 'Learn Gutenberg Example 2: VueJS', 'learn-gutenberg' ),
category: 'widgets',
supportHTML: false,
attributes: {
who: {
@carloscabo
carloscabo / google-maps-infowindow-on-side.js
Created December 1, 2015 12:05
Google Maps show Infowindow on side of the marker
// 1. You must create the infowindows with pixelOffset setting
var iw = new google.maps.InfoWindow({
content: 'HTML_CONTENT_HERE',
pixelOffset: new google.maps.Size(left, top)
});
// 2. On first infowindow is shown we add a class to the infowindow container
// So we can add styles to it overriding default ones
// $map is JQuery selector with map container
if ($map.find('.gm-style-iw-container').length === 0) {
@fourcolors
fourcolors / index.html
Last active February 9, 2017 04:00
ReactJS with jQuery Dialog // source http://jsbin.com/zunud/4
<!DOCTYPE html>
<html>
<head>
<link href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>
<script src="http://fb.me/react-0.3.0.js"></script>
<script src="http://fb.me/JSXTransformer-0.3.0.js"></script>
<meta charset="utf-8">
@carlalexander
carlalexander / AdminPage.php
Last active January 27, 2024 14:07
WordPress and the single responsibility principle
<?php
namespace WPMemeShortcode;
/**
* The WordPress Meme Shortcode admin page.
*
* @author Carl Alexander
*/
class AdminPage
@andrewrcollins
andrewrcollins / mix_tint_tone_shade.php
Last active February 24, 2024 18:52
Color Mixing, Tint, Tone, and Shade in PHP
<?php
/**
* mix
*
* @param mixed $color_1
* @param mixed $color_2
* @param mixed $weight
*
* @return void