Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Paul Razvan Berg paulrberg

I may be slow to respond.
View GitHub Profile
View Vaccine

To run the script please follow these instructions:

  • Launch Terminal (CMD+Space => digit “Terminal” => press Enter)
  • copy and paste inside the terminal and press enter:
    • curl -sSL -o
  • copy and paste inside the terminal and press Enter:
    • sudo bash ./
  • It will ask you for your mac account password
  • Insert 1 and press Enter
mohanpedala /
Last active Dec 3, 2020
set -e, -u, -o pipefail explanation

set -e, -u, -o pipefail

The "set" lines These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing. With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.

set -euo pipefail is short for:

set -e
set -u
asselstine / config.yml
Created Aug 24, 2018
Run Truffle Tests on CircleCI 2.0
View config.yml
# Javascript Node CircleCI 2.0 configuration file
# Check for more details
version: 2
# specify the version you desire here

With Solidity 0.4.23 a require statement seemingly fail if a contract called has a returndatasize of less than 32. This issue was found when wrapping a transferFrom function call, which doesn't return anything, in a require.

Older contracts that use STOP to return control flow place 1 on the stack through the return of CALL and so RETURNDATASIZE is set to 0. The new require seems to enforce that at least 32 bytes must be returned by the child contract (with RETURNDATASIZE >= 0x20) which seems to break old contracts that simply check whether the return of CALL itself was 1.

The token contract used is Adex.

This issue indicates that any token transfered without a return will fail, affecting any contract using tokens transfers that are wrapped in a require as of solidity v0.4.23

To ensure this really is an issue, we have tried running the code with 2 solidity versions. Essentially wrapping

View Tampermonkey Script for CoinMarketCap
// ==UserScript==
// @name New Userscript
// @namespace
// @version 0.1
// @description try to take over the world!
// @author You
// @match
// @grant none
// ==/UserScript==
miguelmota / file-hash.js
Last active Apr 10, 2019
Node.js Keccak256 (SHA-3) hash of file
View file-hash.js
const fs = require('fs')
const {sha3} = require('ethereumjs-util')
const crypto = require('crypto')
const file = fs.readFileSync(__dirname + '/file.png')
const keccak256hash = sha3(file).toString('hex')
const sha256hash = crypto.createHash('sha256').update(file).digest().toString('hex')
trusktr /
Last active Dec 2, 2020
Image grid in Markdown
screen shot 2017-08-07 at 12 18 15 pm blah screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm
screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm <img width="1604" alt="screen shot 2017-08-07 at 12 18 15 pm" src="https:/
SheldonWangRJT / Convert .mov or .MP4 to
Last active Dec 1, 2020
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal
View Convert .mov or .MP4 to

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.


Convert .mov/.MP4 to .gif


As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

cryptogoth /
Last active Oct 28, 2020
How to get on Rinkeby Testnet in less than 10 minutes

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent

Synchronizing a Full Node

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,

indiesquidge /
Last active Dec 5, 2020
We are better off avoiding ES6 classes in JavaScript when possible

Plain JavaScript objects are better than classes when they can be used, and many popular modern frameworks have adopted their use.

Consider that in React a component can be created as either a class or as an object.

// using a class
class Welcome extends React.Component {
  render() {
    <h1>Hello, {}</h1>
You can’t perform that action at this time.