Skip to content

Instantly share code, notes, and snippets.

@antho1404
antho1404 / process.yml
Last active December 26, 2019 03:52
Workflow
key: erc20-notification
steps:
- type: trigger
instance:
src: https://github.com/mesg-foundation/service-ethereum-erc20
env:
- PROVIDER_ENDPOINT=$(env:PROVIDER_ENDPOINT)
eventKey: transfer
- type: task
instance:

v0.8.1 mesg-core service start => no error mesg-core service stop => no error

  • test installation ethwallet service almost impossible to sync
  • Migration v0.8 -> v0.9
    • create service migrate -> service disapears
    • revert version -> service still here
  • Create a service
  • Init function
Verifying my Blockstack ID is secured with the address 1K4TMtgeCVSLKYjRMNeJFjUu7tnRrH2CxR https://explorer.blockstack.org/address/1K4TMtgeCVSLKYjRMNeJFjUu7tnRrH2CxR
@antho1404
antho1404 / migration.js
Last active September 25, 2018 07:07
A script to be able to execute some data migrations with graphcool framework
const fs = require('fs')
const os = require('os')
const vm = require('vm')
const yaml = require('js-yaml')
const { paramCase } = require('change-case')
const { GraphQLClient } = require('graphql-request')
const cmd = process.argv[2]
const MIGRATION_PATH = `./db/migrations`
const isLocalTarget = target => target.startsWith('local/')
@antho1404
antho1404 / start-docker-machine.sh
Last active March 9, 2016 08:34
Script to start a docker machine and add associated (sub)domains to the host file
# Script to start a docker machine and add associated (sub)domains to the host file
# arguments:
# - name of the docker machine
# - list of subdomains separated by a comma
#
# example
# start_machine myproject www,api
# will result to start the machine myproject and create myproject.dev, www.myproject.dev and api.myproject.dev to access the machine IP
function start_machine {
started=false
@antho1404
antho1404 / ssl_for_heroku.sh
Created January 26, 2015 07:24
generate a ssl certificate, combine it and add it to a heroku app
if [ $1 = "create" ]
then
brew update
brew upgrade openssl
openssl genrsa -des3 -out server.pass.key 2048
openssl rsa -in server.pass.key -out server.key
openssl req -nodes -new -key server.key -out server.csr
echo ''
cat server.csr
cat server.csr | pbcopy
@antho1404
antho1404 / debug-angular.coffee
Created January 8, 2015 14:43
Debug your angular scopes and modules
findScope = (id, scope) ->
return null unless scope
return scope if "##{scope.$id}" is id
child = scope.$$childHead
while child
scope = findScope id, child
return scope if scope
child = child.$$nextSibling
return null
@antho1404
antho1404 / websql_query_debug.coffee
Last active December 19, 2015 01:18
This script permits to debug websql queries
websql_query_debug = (db) ->
# replace transaction method needed to have transaction object
db.old_transaction = db.transaction
db.transaction = (callback) =>
db.old_transaction (tx) =>
# replace sql method and include log
tx.old_executeSql = tx.executeSql
tx.executeSql = (sql, values, success, error) =>
log = sql
for val in values