Skip to content

Instantly share code, notes, and snippets.

AJ Villalobos iamajvillalobos

Block or report user

Report or block iamajvillalobos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fetchAddressBalances.js
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);
}
View package.json
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
View AddressCheckerButton.js
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 Sep 18, 2018
Hello this is cool
View text.rb
class Text
def greet
puts "This is cool!"
end
end
@iamajvillalobos
iamajvillalobos / hello_vue.js
Created Aug 29, 2018
vuejs runtime vs compiler
View hello_vue.js
/* 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 Mar 19, 2018
How to signed your commits in GitHub using gpg
View guide.md
  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]
View gist:3e7e028db77543129486b6835858cc18
bin/rails test test/ --seed 9808 -n "/^(?:test_new_employees_sorts_specified_time))$/"
View gist:e4c89d99a01ecc8f9f85a78182640147
bundle exec minitest_bisect --seed 9808 -Itest test/
...
...
...
Final reproduction:
Run options: --seed 9808 -n "/^(?:test_new_employees_sorts_specified_time))$/"
View gist:4cd25c4f7646a9eb6076eeb65618eb44
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)
View gist:0ab4fea5765edd753acf9426fd8472b9
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.
You can’t perform that action at this time.