Skip to content

Instantly share code, notes, and snippets.

View mseijas's full-sized avatar

Matias Seijas mseijas

View GitHub Profile
@mseijas
mseijas / openxcode.bash
Created June 15, 2021 17:29
Open active Xcode version
function openxcode() {
if pgrep -x "Xcode" > /dev/null; then
read -k 1 "USER_INPUT?Xcode is already running. Close running version first? (y/N) "
if [[ "$USER_INPUT" =~ ^[Yy]$ ]]; then
killall Xcode
fi
fi
ACTIVE_XCODE_DIRECTORY=$(xcode-select -p)
SUFFIX_LENGTH=19 # "/Contents/Developer"
@mseijas
mseijas / ERC721.json
Created August 31, 2018 21:27
ERC721 Contract ABI
[
{
"constant":true,
"inputs":[
],
"name":"name",
"outputs":[
{
"name":"_name",
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"bracketSpacing": true,
"jsxBracketSameLine": false
}
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6
},
"extends": [
"prettier/react",
"prettier",
"prettier/standard",
"standard",
@mseijas
mseijas / soliumrc.json
Created May 29, 2018 19:17
Solium style rules
{
"extends": "solium:recommended",
"plugins": ["security"],
"rules": {
"quotes": ["error", "double"],
"indentation": [0],
"arg-overflow": ["warning", 3],
"security/enforce-explicit-visibility": ["error"],
"security/no-inline-assembly": ["warning"]
}
const SocialNetworkProxy = artifacts.require('SocialNetworkProxy')
const SocialNetworkV1 = artifacts.require('SocialNetworkV1')
const SocialNetworkV2 = artifacts.require('SocialNetworkV2')
contract('SocialNetworkProxy', async accounts => {
let proxy, socialNetworkProxy, socialNetworkV1, socialNetworkV2
before(async () => {
proxy = await SocialNetworkProxy.deployed()
socialNetworkV1 = await SocialNetworkV1.deployed()
const SocialNetworkProxy = artifacts.require('SocialNetworkProxy')
const SocialNetworkV1 = artifacts.require('SocialNetworkV1')
const SocialNetworkV2 = artifacts.require('SocialNetworkV2')
module.exports = (deployer, network, accounts) => {
deployer.then(async () => {
/***********************************
* 1. INITIAL DEPLOYMENT
***********************************/
let proxy, socialNetworkV1, proxySocialNetwork
const SocialNetworkProxy = artifacts.require('SocialNetworkProxy')
const SocialNetworkV1 = artifacts.require('SocialNetworkV1')
module.exports = deployer => {
deployer.then(async () => {
let proxy, socialNetworkV1
// 1. Deploy SocialNetworkProxy
proxy = await deployer.deploy(SocialNetworkProxy)
const SocialNetworkProxy = artifacts.require('SocialNetworkProxy')
const SocialNetworkV1 = artifacts.require('SocialNetworkV1')
contract('SocialNetworkProxy', async () => {
let proxy, socialNetworkProxy, socialNetworkV1
before(async () => {
proxy = await SocialNetworkProxy.deployed()
socialNetworkV1 = await SocialNetworkV1.deployed()
})
const SocialNetworkProxy = artifacts.require('SocialNetworkProxy')
const SocialNetworkV1 = artifacts.require('SocialNetworkV1')
contract('SocialNetworkProxy', async () => {
let proxy, socialNetworkProxy, socialNetworkV1
before(async () => {
proxy = await SocialNetworkProxy.deployed()
socialNetworkProxy = SocialNetworkV1.at(proxy.address)
socialNetworkV1 = await SocialNetworkV1.deployed()