Skip to content

Instantly share code, notes, and snippets.

View iamajvillalobos's full-sized avatar

AJ Villalobos iamajvillalobos

View GitHub Profile
async function fetchAddressBalances() {
if (isFederatedAddress(address)) {
let xlmAddress = await fetchXLMAddressFromFederation(address);
if (xlmAddress.length > 0) {
let result = await fetchXLMAddressBalances(xlmAddress);
if (Array.isArray(result)) {
onButtonClick(result);
} else {
onError(result);
}
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
import React from "react";
import axios from "axios";
const STELLAR_API_URL = "https://horizon.stellar.org/accounts";
function AddressCheckerButton({ address, onButtonClick, onError }) {
function fetchAddressBalances() {
const url = `${STELLAR_API_URL}/${address}`;
axios
.get(url)
@iamajvillalobos
iamajvillalobos / text.rb
Last active September 18, 2018 13:06
Hello this is cool
class Text
def greet
puts "This is cool!"
end
end
@iamajvillalobos
iamajvillalobos / hello_vue.js
Created August 29, 2018 04:42
vuejs runtime vs compiler
/* eslint no-console: 0 */
// Run this example by adding <%= javascript_pack_tag 'hello_vue' %> (and
// <%= stylesheet_pack_tag 'hello_vue' %> if you have styles in your component)
// to the head of your layout file,
// like app/views/layouts/application.html.erb.
// All it does is render <div>Hello Vue</div> at the bottom of the page.
import Vue from 'vue'
import App from '../app.vue'
@iamajvillalobos
iamajvillalobos / guide.md
Created March 19, 2018 14:44
How to signed your commits in GitHub using gpg
  1. Open https://github.com/settings/gpg/new in a new tab
  2. Install gpg-suite brew cask install gpg-suite
  3. Generate your gpg key gpg --full-generate-key NOTE: Enter 4096 for key size
  4. View your gpg keys with gpg --list-secret-keys --keyid-format Sample:
gpg --list-secret-keys --keyid-format LONG
/Users/hubot/.gnupg/secring.gpg
------------------------------------
sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
bin/rails test test/ --seed 9808 -n "/^(?:test_new_employees_sorts_specified_time))$/"
bundle exec minitest_bisect --seed 9808 -Itest test/
...
...
...
Final reproduction:
Run options: --seed 9808 -n "/^(?:test_new_employees_sorts_specified_time))$/"
MTB_VERBOSE=2 bundle exec minitest_bisect --seed 9808 -Itest test/
lib/rails/test_unit/minitest_plugin.rb:62:in `plugin_rails_options': invalid option: --server (OptionParser::InvalidOption)
bundle exec minitest_bisect --seed 9808 -Itest test/
reproducing... in 3.08 sec
Reproduction run passed? Aborting.
Try running with MTB_VERBOSE=2 to verify.