Skip to content

Instantly share code, notes, and snippets.

View bolom's full-sized avatar

Bolo Michelin bolom

View GitHub Profile
@bolom
bolom / migration.md
Last active February 16, 2023 15:35 — forked from mariochavez/migration.md
RSpec to Minitest

These are the scripts that I used to migrate from RSpec to Minitest in a Rails aplication.

It is expected for the test suite to be in RSpec 3.x sintax.

  1. Install rename library from Homebrew
  2. Remove RSpec/TestUnit from Gemfile
  3. Add minitest-rails gem
  4. Rename spec forder to test
  5. Add a test_helper.rb file
const ABI = [
{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},
{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"workable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},
{"inputs":[],"name":"strategies","outputs":[{"internalType":"address[]","name":"_strategies","type":"address[]"}],"stateMutability":"view","type":"function"}]
const strategies = [{ name: 'StrategyCurve3CrvVoterProxy', address: '0xc59601f0cc49baa266891b7fc63d2d5fe097a79d'},
{ name: 'StrategyCurveBTCVoterProxy', address: '0x6d6c1ad13a5000148aa087e7cbfb53d402c81341'},
{ name: 'StrategyCurveYVoterProxy', address: '0x07DB4B9b3951094B9E278D336aDf46a036295DE7'},
{ name: 'StrategyCurveBUSDVoterProxy', address: '0x112570655b32A8c747845E0215ad139661e66E7F'},
{ name: 'StrategyCurveGUSDProxy', address: '0xc8327d8e1094a94466e05a2cc1f10fa70a1df11
const { ethers } = require("ethers");
const { DefenderRelaySigner } = require('defender-relay-client/lib/ethers');
// Settings edited by user
const INFURA_PROJECT_ID = "XXXX";
const INFURA_PROJECT_SECRET = "XXXX";
// ABIs for jobs and registry (contain only the methods needed, not the full ABIs of the contracts)
const ABI = [ {"inputs":[],"name":"workable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},
{"inputs":[],"name":"work","outputs":[],"stateMutability":"nonpayable","type":"function"}]
@bolom
bolom / autotask.js
Last active November 11, 2020 03:24
autotask.js
const { ethers } = require("ethers");
const { DefenderRelaySigner } = require('defender-relay-client/lib/ethers');
// Settings edited by user
const INFURA_PROJECT_ID = "XXXX";
const INFURA_PROJECT_SECRET = "XXXX";
// ABIs for jobs and registry (contain only the methods needed, not the full ABIs of the contracts)
const ABIs = {
fetch a specific app
Request
{
login: 'bolo@lordalexworks.com'
password: '****',
package: 'io.transporterapp.test'
}
GIT
remote: git://github.com/spree-contrib/spree_braintree_vzero.git
revision: b65e179bcb793a5f12aa867b002e08f01f125cdb
specs:
spree_braintree_vzero (3.2.0.beta)
braintree (>= 2.40.0)
spree_backend (>= 3.1.0, < 4.0)
spree_core (>= 3.1.0, < 4.0)
spree_frontend (>= 3.1.0, < 4.0)
whenever
@bolom
bolom / Gemfile
Last active January 19, 2017 20:19
source "http://rubygems.org"
ruby "2.3.1"
gem 'fastlane'
gem 'dotenv'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval(File.read(plugins_path), binding) if File.exist?(plugins_path)
{"log":[{"dataPackets":{"msy.mxp.datapacket.PositionWithDOP":{"speed":24,"gpsNumSatellite":7,"wgs84degMinFormat":true,"glonassNumSatellite":5,"HDOP":10,"longitude":4222.665,"latitude":45.83019,"VDOP":17,"fixValid":true,"glonass":true,"fixMode":3,"course":120,"timeValid":true,"PDOP":20,"altitude":50,"ts":{"ts":1442461994200,"MILLI_SECONDS_FROM_1ST_GEN_2001":946684800000}},"msy.mxp.datapacket.TripInfo":{"mlPartialTravelDist":99}}},{"dataPackets":{"msy.mxp.datapacket.PositionWithDOP":{"speed":34,"gpsNumSatellite":8,"wgs84degMinFormat":true,"glonassNumSatellite":3,"HDOP":10,"longitude":4222.668,"latitude":45.82861,"VDOP":17,"fixValid":true,"glonass":true,"fixMode":3,"course":122,"timeValid":true,"PDOP":20,"altitude":60,"ts":{"ts":1442462024200,"MILLI_SECONDS_FROM_1ST_GEN_2001":946684800000}},"msy.mxp.datapacket.TripInfo":{"mlPartialTravelDist":199}}},{"dataPackets":{"msy.mxp.datapacket.PositionWithDOP":{"speed":4,"gpsNumSatellite":6,"wgs84degMinFormat":true,"glonassNumSatellite":4,"HDOP":11,"longitude":4222.669,"
//
// Imei.swift
// T2
//
// Created by Marko Budal on 08/09/15.
// Copyright (c) 2015 lordalexworks. All rights reserved.
//
/*
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@bolom
bolom / AES.swift
Last active October 4, 2015 11:18
hex
import Foundation
// package msy.ble;
func + (a: String, b: Int8) -> String {
return "\(a)\(b)";
}
public class AES {
public class sect {