Skip to content

Instantly share code, notes, and snippets.

View antenando's full-sized avatar

Fernando Bueno antenando

View GitHub Profile
@antenando
antenando / all-wordpress-posts.php
Created April 6, 2017 21:34
All Wordpressssssssss Posts
<?php
/*
Template Name: Query
*/
?>
<?php get_header(); ?>
<div class="page-content page-explore">
<?php get_template_part('includes/feature','top'); ?>
@antenando
antenando / function_invocation.js
Created April 7, 2017 21:33 — forked from myshov/function_invocation.js
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
Verifying that "antenando.id" is my Blockstack ID. https://onename.com/antenando
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
html {
cursor: none;
}
@antenando
antenando / protips.js
Created May 17, 2017 04:37 — forked from nolanlawson/protips.js
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
# Thanks to this post:
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x
$ brew install cabextract
$ cd ~/Downloads
$ mkdir consolas
$ cd consolas
$ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe
$ cabextract PowerPointViewer.exe
$ cabextract ppviewer.cab
@antenando
antenando / bling.js
Created September 1, 2017 17:17 — forked from paulirish/bling.js
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@antenando
antenando / choo-onload.js
Created September 29, 2017 12:04
choo onload
import choo from 'choo'
import html from 'choo/html'
import log from 'choo-log'
import onload from 'on-load'
const app = choo()
app.use(log())
export const atestView = (state, emit) => {
@antenando
antenando / template-literals-1-if-statements.js
Created October 10, 2017 03:29 — forked from wiledal/template-literals-1-if-statements.js
Template Literal Examples: if-statement
/*
Template literals if-statement example
Using a single-line conditional, we can create an if-statements within template literals.
*/
function makeHTML(title) {
return `
${title ? `
This element has a title, and it is "${title}"
` : `