Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Man At Work 🚜

Eduardo Pereira eduardonunesp

💻
Man At Work 🚜
View GitHub Profile
@eduardonunesp
eduardonunesp / sign-offline.js
Created Oct 15, 2018 — forked from neuhaus/sign-offline.js
Ethereum: Sign an offline transaction
View sign-offline.js
#!/usr/bin/env node
'use strict';
// ethereum: generate signed transactions
const fs = require('fs-extra');
const rls = require('readline-sync');
const Accounts = require('web3-eth-accounts');
const web3utils = require('web3-utils');
const accounts = new Accounts();
View Shopify Random Product Order
<script type="text/javascript>
function fisherYates ( myArray ) {
var i = myArray.length, j, temp;
if ( i === 0 ) return false;
while ( --i ) {
j = Math.floor( Math.random() * ( i + 1 ) );
temp = myArray[i];
myArray[i] = myArray[j];
myArray[j] = temp;
}
View chat.go
package main
import (
"bufio"
"net"
)
type Client struct {
incoming chan string
outgoing chan string
View html5-video-streamer.js
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
@eduardonunesp
eduardonunesp / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View uuid_test.c
//
// libuuid sample program
//
// library install for debian
// $ sudo apt-get install uuid-dev
//
// compile
// $ gcc uuid_test.c -luuid -o uuid_test
//
#include <stdio.h>
You can’t perform that action at this time.