Skip to content

Instantly share code, notes, and snippets.

import * as bip32 from 'bip32';
import * as BufferLayout from 'buffer-layout';
import _ from 'lodash';
import nacl from 'tweetnacl';
import { Service } from 'typedi';
import {
Account, Connection, PublicKey, SystemProgram, SYSVAR_RENT_PUBKEY, Transaction,
TransactionInstruction
} from '@solana/web3.js';
@jamesflorentino
jamesflorentino / .eslintrc.json
Created December 10, 2016 06:16
My current ESLint configuration file for backend Node.js projects
{
"extends": "eslint:recommended",
"env": {
"node": true,
"browser": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
function ESLintFix()
silent execute "!./node_modules/.bin/eslint --fix %"
edit! %
Neomake
endfunction
nnoremap <leader><leader> :call ESLintFix()<CR>
@jamesflorentino
jamesflorentino / GIF-Screencast-OSX.md
Created July 14, 2016 21:17 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jamesflorentino
jamesflorentino / code-of-ethics.md
Created November 13, 2015 08:45 — forked from vicmaster/code-of-ethics.md
Code of Ethics

Never forget this

Code of Ethics

  • Always communicate. Always be online on Slack.
  • Always work with a Pull Request. Long running PRs are welcome but mark them with [WIP] so we don't merge it.
  • Follow the git flow principles.
  • We always work with a Milestone. See the current milestone here https://github.com/organization/project/issues/milestones link changed purposely
  • Don't hesitate to review other people's work. Always welcome criticism.
<h2>SVG animation demo.</h2>
<svg xmlns:xlink="http://www.w3.org/1999/xlink" id="james-pogi-lol" image-rendering="auto" baseProfile="basic" version="1.1" x="0px" y="0px" width="200" height="170" overflow="visible" xmlns="http://www.w3.org/2000/svg"><g><g id="Tween_13" transform="matrix(1 0 0 1 69.65 56.95)" opacity="1"><animateTransform attributeName="transform" additive="replace" type="translate" dur="0.967s" keyTimes="0;0.034;0.069;0.103;0.138;0.172;0.207;0.241;0.276;0.31;0.345;0.379;0.414;1" values="49.65,36.95;50.3,37.6;52.2,39.5;55.35,42.65;59.75,47.05;65.45,52.75;66.55,53.85;67.5,54.8;68.3,55.6;68.9,56.2;69.3,56.6;69.55,56.85;69.65,56.95;69.65,56.95" calcMode="discrete"/><animate attributeName="opacity" dur="0.967s" keyTimes="0;0.034;0.069;0.103;0.138;0.172;0.207;0.241;0.276;0.31;0.345;0.379;0.414;1" values="0;0.01;0.05;0.12;0.22;0.34;0.52;0.66;0.79;0.88;0.95;0.99;1;1" calcMode="discrete"/><path fill="#292929" d="M26.15,-25.5L-1.15,-25.5 -26.15,17.5 -21.5,25.5 -1.95,25.5 26.15,-25.5"/></g></g><g><g id=
function errorHandler(res) {
return function(err) {
res.send(400).send(err);
}
}
@jamesflorentino
jamesflorentino / lol.js
Created July 30, 2014 07:15
multiple rainbows all the way
var css = "text-shadow: -1px -1px hsl(0,100%,50%), 1px 1px hsl(5.4, 100%, 50%), 3px 2px hsl(10.8, 100%, 50%), 5px 3px hsl(16.2, 100%, 50%), 7px 4px hsl(21.6, 100%, 50%), 9px 5px hsl(27, 100%, 50%), 11px 6px hsl(32.4, 100%, 50%), 13px 7px hsl(37.8, 100%, 50%), 14px 8px hsl(43.2, 100%, 50%), 16px 9px hsl(48.6, 100%, 50%), 18px 10px hsl(54, 100%, 50%), 20px 11px hsl(59.4, 100%, 50%), 22px 12px hsl(64.8, 100%, 50%), 23px 13px hsl(70.2, 100%, 50%), 25px 14px hsl(75.6, 100%, 50%), 27px 15px hsl(81, 100%, 50%), 28px 16px hsl(86.4, 100%, 50%), 30px 17px hsl(91.8, 100%, 50%), 32px 18px hsl(97.2, 100%, 50%), 33px 19px hsl(102.6, 100%, 50%), 35px 20px hsl(108, 100%, 50%), 36px 21px hsl(113.4, 100%, 50%), 38px 22px hsl(118.8, 100%, 50%), 39px 23px hsl(124.2, 100%, 50%), 41px 24px hsl(129.6, 100%, 50%), 42px 25px hsl(135, 100%, 50%), 43px 26px hsl(140.4, 100%, 50%), 45px 27px hsl(145.8, 100%, 50%), 46px 28px hsl(151.2, 100%, 50%), 47px 29px hsl(156.6, 100%, 50%), 48px 30px hsl(162, 100%, 50%), 49px 31px hsl(167.4, 100%, 5
@jamesflorentino
jamesflorentino / .gitignore
Last active August 29, 2015 14:03
My solution to enabling livereload with connect-assets.
.tmp
@jamesflorentino
jamesflorentino / gist:83ee9f24014d03d09d18
Last active August 29, 2015 14:03
Git and GitHub Tips

Syncing a Forked repo via command line

cd /path/to/your/forked/repo
git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
git fetch upstream
git merge upstream branch_name