Skip to content

Instantly share code, notes, and snippets.

Jori Lallo jorilallo

Block or report user

Report or block jorilallo

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
jorilallo / determineRetinaUpload.js
Created Dec 19, 2018
Detect DPI information for a PNG image to determine if it's retina quality or not. This can be done by reading optional physical pixel dimensions chunk which both macOS and Windows attach to the image data.
View determineRetinaUpload.js
import extract from "png-chunks-extract";
* Detect if PNG image is in retina resolution.
* PNG Chunk documentation:
const determineRetinaUpload = async (imageUrl) => {
let retinaImage = false;
const response = await fetch(imageUrl);
jorilallo / Flex.js
Created Aug 17, 2017
Flexbox component for React
View Flex.js
// @flow
import React from 'react';
import styled from 'styled-components';
type GlobalCssValues = 'initial' | 'inherit' | 'unset';
type WrapValue = 'nowrap' | 'wrap' | 'wrap-reverse' | GlobalCssValues;
type JustifyValue =
| 'center'
View .eslintrc
"extends": [
"rules": {
"flowtype/type-id-match": [
jorilallo / .flowconfig
Created Jun 30, 2016
Flowtype config for Webpack and ES6/7
View .flowconfig
# Support webpack's resolve.root

I absolutely HATE the new Kippt. It sucks. It's 1,000 times harder to view my links. It makes me more inefficient, which is the opposite of what I hoped Kippt could do for me. Also, moving the search feature to the left side of the screen is plain idiotic. Most sites have inadvertently trained users to look for this feature in the upper right corner of the screen, so that's what users do. But you guys place yours in the least-popular place to set a search feature, so that it literally is the last place one will look when seeking it. I left delicious because I liked your (now old) design, but the only thing I liked about Kippt is long gone. This new design may have inspired high-fives from all the geeks that created it, but for the common user, this is an absolute FAIL. It is not intuitive and it certainly does not simplify my workflow. If it does not change back by next week, my account will be inactive and I'll find another site to use. Last thing, fire all the morons that had a say in approving this shit sa

jorilallo / gist:7b9b2e632964c5fbf827
Created Jan 29, 2015
Coinbase Exchange signing with PHP
View gist:7b9b2e632964c5fbf827
class CoinbaseExchange {
public function __construct($key, $secret, $passphrase) {
$this->key = $key;
$this->secret = $secret;
$this->passphrase = $passphrase;
public function signature($request_url='', $body='', $timestamp=false, $method='GET') {
$body = is_array($body) ? json_encode($body) : $body;
jorilallo / gist:c72e2211b7b8d3770bc3
Created Jan 29, 2015
Coinbase Exchange signing with Ruby
View gist:c72e2211b7b8d3770bc3
require "base64"
require 'openssl'
require 'json'
class CoinbaseExchange
def initialize(key, secret, passphrase)
@key = key
@secret = secret
@passphrase = passphrase
jorilallo / gist:0cd603b691acb551b2e0
Created Jan 29, 2015
Coinbase Exchange signing with Python
View gist:0cd603b691acb551b2e0
# Requires python-requests. Install with pip:
# pip install requests
# or, with easy-install:
# easy_install requests
import json, hmac, hashlib, time, requests, base64
from requests.auth import AuthBase
jorilallo / gist:1e61f3185ef75f00759b
Created Jan 29, 2015
Coinbase Exchange signing with Node.js
View gist:1e61f3185ef75f00759b
var crypto = require('crypto');
var secret = 'PYPd1Hv4J6/7x...';
var timestamp = / 1000;
var req_url = '/orders';
var body = JSON.stringify({
price: '1.0',
size: '1.0',
View gist:53d7f2a9e39a4256ba5a
Verifying that +jorilallo is my Bitcoin username. You can send me #bitcoin here:
You can’t perform that action at this time.