Skip to content

Instantly share code, notes, and snippets.

View gre's full-sized avatar
3 cups required

@greweb gre

3 cups required
View GitHub Profile
#!/bin/bash
cd $(dirname $0)
./genOne.sh sync_Vertcoin Vertcoin
./genOne.sh sync_Dash Dash
./genOne.sh sync_Stakenet Stakenet
./genOne.sh sync_Viacoin Viacoin
./genOne.sh sync_PivX PivX
./genOne.sh sync_Komodo Komodo
@gre
gre / package.json
Last active December 13, 2019 19:37
live-common in a nutshell
{
"private": true,
"name": "send-example",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@ledgerhq/hw-transport-node-hid-noevents": "canary",
"@ledgerhq/ledger-core": "alpha",
"@ledgerhq/live-common": "alpha",
require("babel-polyfill");
const request = require("request");
const { listTokens } = require("@ledgerhq/live-common/lib/currencies");
require("@ledgerhq/live-common/lib/load/tokens/ethereum/erc20");
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
const fetch = url =>
new Promise((resolve, reject) =>
request(url, (error, response, body) => {
@gre
gre / pusher.scala
Created August 6, 2011 14:38
Using Pusher API with Play framework in scala for publishing events
// Implementing the publishing Pusher REST API
// @see http://pusher.com/docs/rest_api
// with Play (scala) Framework
// @see http://scala.playframework.org/
class Pusher {
val appId = Play.configuration.getProperty("pusher.appId")
val key = Play.configuration.getProperty("pusher.key")
val secret = Play.configuration.getProperty("pusher.secret")
@gre
gre / foo.glsl
Created June 18, 2014 21:15 — forked from glslioadmin/TEMPLATE.glsl
/!\ **DEV ONLY** - GLSL.io Transition (v1) used for the development
// N.B. this file is used only for the testing version of GLSL.io
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
uniform float persp;
/*
* I want to trigger something 5s after mount with some props
*/
const Thing = ({ a, b }) => {
useEffect(() => {
const timeout = setTimeout(() => {
doTheThing(a, b);
}, 5000);
@gre
gre / nsSMILKeySpline.cpp
Created February 27, 2012 17:39
copy pasted from the Firefox source code - this is how Firefox render CSS Transitions Timing Functions.
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
@gre
gre / README.md
Last active January 14, 2019 22:41
Standalone minimal version of Google Photos Albums list in order for you to share photos with family and with link to multiple shared google photos albums

DWTFYW

Disclaimer:

  • no warranty this will work for you!
  • I'm not responsible of how you use this!
  • READ, VERIFY and TEST the CODE before using!
async function suspenseReadToPromise(read, ...args) {
let value;
try {
value = read(...args);
} catch (e) {
if (e && typeof e.then === "function") {
value = await e;
}
else {

Keybase proof

I hereby claim:

  • I am gre on github.
  • I am greweb (https://keybase.io/greweb) on keybase.
  • I have a public key whose fingerprint is 70D1 29E9 37F5 DB8B BC04 6E46 92B0 2128 CF8C 915B

To claim this, I am signing this object: