Skip to content

Instantly share code, notes, and snippets.

View Dudemullet's full-sized avatar

Pipe Gutierrez Dudemullet

View GitHub Profile
componentWillReceiveProps(nextProps) {
if (nextProps.lastRequestedUserLocationAt > this.props.lastRequestedUserLocationAt) {
if (nextProps.lastUpdated > this.props.lastUpdated) {
const markers = this.createMarkersForLocations(nextProps);
if (markers && Object.keys(markers)) {
const clusters = {};
paulirish / open-chrome-tabs-in-safari.scpt
Created April 4, 2016 00:24
open chrome tabs in safari
tell application "Google Chrome"
set tab_list to every tab in the front window
repeat with the_tab in tab_list
set the_url to the URL of the_tab
tell application "Safari" to open location the_url
end repeat
end tell
jamescmartinez / slack_delete.rb
Last active May 28, 2024 15:00
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = ( - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
chantastic / on-jsx.markdown
Last active May 30, 2024 13:11
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

paulirish / bling.js
Last active May 1, 2024 19:56
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;
ericelliott /
Last active May 17, 2024 03:38
Essential JavaScript Links
justindmyers / CURP and RFC for Mexico
Last active August 10, 2018 14:21
Hard to find regex
benshimmin / gist:4088493
Created November 16, 2012 16:03
Scale to fit and centre-align an image with FPDF
/* Caveat: I'm not a PHP programmer, so this may or may
* not be the most idiomatic code...
* FPDF is a free PHP library for creating PDFs:
class PDF extends FPDF {
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
bkeating /
Created March 11, 2010 21:36
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script ( that sets us up with the proper command line arguments for Git to pass off files to FileMerge.