Skip to content

Instantly share code, notes, and snippets.


Helder Santana heldr

Block or report user

Report or block heldr

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

Keybase proof

I hereby claim:

  • I am heldr on github.
  • I am heldr ( on keybase.
  • I have a public key ASBwmQHJaS4fN2i0fDYzEDHmCaCeTx6qbEgvx0ZTawpNMwo

To claim this, I am signing this object:

heldr / App.tsx
Last active Feb 13, 2019
React hooks load page chunk (code splitting)
View App.tsx
import React from 'react';
import { Router } from "@reach/router";
import LoadComponent from './LoadComponent';
const FoobarLoader = () => import('./pages/Foobar');
const App: React.StatelessComponent<{}> = () => (
<LoadComponent componentAsPromised={FoobarLoader} path="foobar" />
heldr / withToggle.js
Created Sep 20, 2016
Higher order component to toggle a prop value
View withToggle.js
* Higher order component to toggle a prop value
* @see
* @function withToggle
* @returns Component
export default function withToggle(WrappedComponent, propName = 'bool') {
class WithToggle extends Component {
constructor(props, context) {
heldr / objextend.js
Created Apr 14, 2016
Assign, extend and merge
View objextend.js
Object.assign({}, { a: 1, b: undefined })
Object {a: 1, b: undefined}
jQuery.extend({}, { a: 1, b: undefined })
Object {a: 1}
// lodash
_.extend({}, { a: 1, b: undefined })
Object {a: 1, b: undefined}
heldr / gulpfile.js
Last active Jan 20, 2020
Another way of splitting a gulpfile into multiple files
View gulpfile.js
Another way of splitting a gulpfile into multiple files based on:
'use strict';
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')(),
heldr / gist:bfa814b7350559823112
Created Sep 30, 2014
Togglable CSS Debug bookmarklet
View gist:bfa814b7350559823112
//based on
javascript:!function(a){for(a.__CSSDebug__=!a.__CSSDebug__,i=0;A=document.all[i++];)"solid hsl("+9*(A+A).length+",99%,50%)1px":null}(window);
heldr / SassMeister-input-HTML.html
Created Jun 3, 2014
Generated by
View SassMeister-input-HTML.html
<article class="post">
<h1 class="post__title">Title</h1>
<picture class="post__picture">
<img src="article/picture.jpg" alt="Something" />
<p class="post__description">
Lorem ipsum...
<article class="post post--highlight">
View gist:9771758

SSHFS on OSX Lion with Homebrew

NOTE: If you recently upgrade to Mountain Lion you probably need fix Homebrew + GCC

Change the /usr/local permission to yourself:

$ chown -R `whoami` /usr/local

Make sure you have a clean installation, if you had installed MacFuse before or you need uninstall it first:

heldr / server.js
Created Jan 28, 2014
Simple node.js static server
View server.js
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs"),
mimer = require('mimer'), // npm install mimer
spawn = require('child_process').spawn,
port = process.argv[2] || 9000;
http.createServer(function(request, response) {

####How to create a bootable usb linux setup on mac (based on Trisquel tutorial )

$ hdiutil convert -format UDRW -o ~/path/to/linux.dmg ~/path/to/linux.iso

Insert your USB stick.

$ diskutil list

again to figure out the device file assigned to your USB stick (e.g. /dev/disk2).

You can’t perform that action at this time.