Skip to content

Instantly share code, notes, and snippets.


Leo Taifa Merinen leotm

Block or report user

Report or block leotm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
aescarcha / nodeAsyncTest.js
Created Sep 25, 2018
Javascript async / await resolving promises at the same time test
View nodeAsyncTest.js
// Simple gist to test parallel promise resolution when using async / await
function promiseWait(time) {
return new Promise((resolve, reject) => {
setTimeout(() => {
}, time);
View detox-bitrise.yml
format_version: 1.1.0
- push_branch: "*"
workflow: tests
- activate-ssh-key: {}
sendgrid-gists / v3-hello-email.php
Last active Aug 9, 2018
v3 "Hello World" for email, using SendGrid with PHP.
View v3-hello-email.php
require 'vendor/autoload.php'; // If you're using Composer (recommended)
// Comment out the above line if not using Composer
// require("<PATH TO>/sendgrid-php.php");
// If not using Composer, uncomment the above line and
// download from the latest release here,
// replacing <PATH TO> with the path to the sendgrid-php.php file,
// which is included in the download:
deparkes /
Last active Dec 6, 2016
Pandas plotting of pizza price comparison
# -*- coding: utf-8 -*-
import pandas as pd
import matplotlib.pyplot as plt
import itertools
# Load data
prices = pd.read_csv("PizzaPrices.csv")
# Filter out an unwanted establishment
prices = prices[(prices['establishment_name'] != "Pizza Zone")]
jack0088 / page.hbs
Created Jan 26, 2015
Ghost - List of posts inside post.hbs and page.hbs
View page.hbs
{{> posts_list}}
sudo service nginx restart
sudo service ghost restart
View github-webhook-handler.php
* GitHub webhook handler template.
* @see
* @author Miloslav Hůla (
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check
paulirish / gist:4158604
Created Nov 28, 2012
Learn JavaScript concepts with recent DevTools features
View gist:4158604

Learn JavaScript concepts with the Chrome DevTools

Authored by Peter Rybin , Chrome DevTools team

In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.


Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:

webjay / gh_hook.php
Last active Nov 20, 2019
Php hook script that can git pull, apc_clear_cache() etc
View gh_hook.php
function syscall ($cmd, $cwd) {
$descriptorspec = array(
1 => array('pipe', 'w'), // stdout is a pipe that the child will write to
2 => array('pipe', 'w') // stderr
dsparks / pokePlot.R
Created Oct 13, 2012
Ridiculous Pokemon plot
View pokePlot.R
# Truly the most ridiculous thing I could think of.
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("XML", "png", "devtools", "RCurl")
if(doInstall){install.packages(toInstall, repos = "")}
lapply(toInstall, library, character.only = TRUE)
# Some helper functions, lineFinder and makeTable
You can’t perform that action at this time.