Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Paul Razvan Berg paulrberg

💭
I may be slow to respond.
View GitHub Profile
View README.md

Zoom.us 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 https://gist.githubusercontent.com/SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9/raw/623c31f90b0a986849ff21145373f960dcbeb67f/zoomus_vaccine.sh -o zoomus_vaccine.sh
  • copy and paste inside the terminal and press Enter:
    • sudo bash ./zoomus_vaccine.sh
  • It will ask you for your mac account password
  • Insert 1 and press Enter
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active Dec 3, 2020
set -e, -u, -o pipefail explanation
View bash_strict_mode.md

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
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 https://circleci.com/docs/2.0/language-javascript/ for more details
#
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
View Issue.md

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 http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://coinmarketcap.com/
// @grant none
// ==/UserScript==
@miguelmota
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')
console.log(keccak256hash)
const sha256hash = crypto.createHash('sha256').update(file).digest().toString('hex')
@trusktr
trusktr / image-grid.md
Last active Dec 2, 2020
Image grid in Markdown
View image-grid.md
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
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
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 .gif.md

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

Need

Convert .mov/.MP4 to .gif

Reason

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
cryptogoth / Rinkeby.md
Last active Oct 28, 2020
How to get on Rinkeby Testnet in less than 10 minutes
View Rinkeby.md

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent https://www.rinkeby.io/

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
indiesquidge / objects-over-classes.md
Last active Dec 5, 2020
We are better off avoiding ES6 classes in JavaScript when possible
View objects-over-classes.md

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, {this.props.name}</h1>
You can’t perform that action at this time.