Skip to content

Instantly share code, notes, and snippets.

View fortil's full-sized avatar
🎯
Focusing

William Penagos fortil

🎯
Focusing
View GitHub Profile
@dugagjin
dugagjin / Lazy.tsx
Created June 26, 2018 19:57 — forked from donaldpipowitch/Lazy.tsx
Lazy loading a React component with TypeScript 2.2
// this is our imaginary package "react-lazy"
import React, { Component, createElement } from 'react';
import { Redirect } from 'react-router-dom';
import { observer } from 'mobx-react';
import { observable } from 'mobx';
/**
* This is generic module interface. We assume that we can access React components.
*/
export interface FetchedModule {
@fermuch
fermuch / hexconverter.js
Created January 17, 2012 13:58
Library for Hexadecimal working with Javascript. I based this on a lib that I found in a blog, but I don't remember the blog, so I'm sorry.
var HexConverter = {
hexDigits : '0123456789ABCDEF',
dec2hex : function( dec )
{
return( this.hexDigits[ dec >> 4 ] + this.hexDigits[ dec & 15 ] );
},
hex2dec : function( hex )
{
@monokrome
monokrome / s3_anon.policy
Created June 4, 2012 05:38
Allowing anonymous access to files on S3.
{
"Id": "Policy<ENTER_RANDOM_NUMBERS_HERE>",
"Statement": [
{
"Sid": "Stmt<ENTER_RANDOM_NUMBERS_HERE>",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::your.bucket.name/*",