Skip to content

Instantly share code, notes, and snippets.

node {
// https://registry.hub.docker.com/_/maven/
def maven32 = docker.image('maven:3.2-jdk-7-onbuild');
stage 'Mirror'
// First make sure the slave has this image.
// (If you could set your registry below to mirror Docker Hub,
// this would be unnecessary as maven32.inside would pull the image.)
maven32.pull()
// We are pushing to a private secure docker registry in this demo.
@ezimuel
ezimuel / sign.sh
Created March 14, 2016 15:50
Sign and verify a file using OpenSSL command line tool. It exports the digital signature in Base64 format.
#!/bin/bash
# Sign a file with a private key using OpenSSL
# Encode the signature in Base64 format
#
# Usage: sign <file> <private_key>
#
# NOTE: to generate a public/private key use the following commands:
#
# openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048
# openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem
@muuki88
muuki88 / jenkins-sbt.groovy
Created November 2, 2016 17:03
Jenkins 2.0 SBT build pipeline
node {
stage('Git') {
git 'https://github.com/muuki88/activator-play-cluster-sample.git'
}
stage('Build') {
def builds = [:]
builds['scala'] = {
// assumes you have the sbt plugin installed and created an sbt installation named 'sbt-0.13.13'
sh "${tool name: 'sbt-0.13.13', type: 'org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation'}/bin/sbt compile test"
}
echo-server-epoll
echo-server-poll
talk
talk.dSYM
@reachlin
reachlin / prometheus.yml
Created April 19, 2017 07:06
sample prometheus configuration explained
// For all the confusing Prometheus configuration and
// regular expressions,
// explained in examples.
// Remember, there are default values for each item if it's missing.
// regex is (.*),
// replacement is $1,
// separator is ;
// ,and action is replace
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@devtdeng
devtdeng / verify_certificate.go
Last active April 28, 2022 13:45
Verify a certificate with chain with golang crypto library
package main
import (
"crypto/x509"
"encoding/pem"
"io/ioutil"
"log"
"os"
)
@decanus
decanus / Issue.md
Last active September 5, 2019 18:01

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

@p0n1
p0n1 / badERC20Token.txt
Created June 8, 2018 12:21
This table is only intended for DAPP developer's reference, please pay attention to all the smart contracts listed and try your best to avoid the incompatibility, especially if you are working with one of them.
## badERC20 Token with code from etherum-org
0xcc2ae7ad8f32ea3bd38d0192d20e465503ae698d_TokenERC20.sol
0x5fe56bfa37217bd8a2879c15c85ed7a894edf5a6_esportz.sol
0x7E42c72DFbE07Cde83a6BaD535A1A97496Df1531_TokenERC20.sol
0xf175C958aFdBF91a0c1981FF0510fCAA87D71899_GeneticHealthToken.sol
0x0d9a3739f7e072e7562f6e2440f37ad9bee68c4a_TokenERC20.sol
0x6e77c68404cb4b86b1cf7ae4ade8d260b4f9d5ce_UlordToken.sol
0xbeebcfe2fbb3c72884341be2b73ae0fc6559b8fc_Q1SToken.sol
0x9d5e22b6599c426b453de4a43df8a0cb4de061b1_YAKcoinERC20.sol
more readable format
pragma solidity ^0.4.24;
interface FoMo3DlongInterface {
function airDropTracker_() external returns (uint256);
function airDropPot_() external returns (uint256);
function withdraw() external;
}