Skip to content

Instantly share code, notes, and snippets.

View iamajvillalobos's full-sized avatar

AJ Villalobos iamajvillalobos

View GitHub Profile
@iamajvillalobos
iamajvillalobos / linux-setup.sh
Created March 20, 2024 04:37 — forked from dhh/linux-setup.sh
linux-setup.sh
# CLI
sudo apt update
sudp apt install \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev libsqlite3-0 \
redis-server mysql-server sqlite3 libmysqlclient-dev apache2-utils \
rbenv
@iamajvillalobos
iamajvillalobos / reset.css
Created December 9, 2023 06:33
css reset
*,
*::before,
*::after {
box-sizing: border-box;
}
~/Development/radiopaedia docker-development
❯ bin/setup
Login Succeeded
== Checking/Installing dependencies ==
The Gemfile's dependencies are satisfied
Waiting for database to become ready
[+] Running 4/0
✔ Network radiopaedia_default Created 0.0s
✔ Container radiopaedia-redis-1 Created 0.0s
✔ Container radiopaedia-s3-1 Created 0.0s
@iamajvillalobos
iamajvillalobos / gist:83f3b2140046bf1f45a6c2694467ee04
Created March 28, 2020 23:01
Install libv8 in Mac OS Catalina 10.15
$ brew install v8@3.15
$ bundle config build.libv8 --with-system-v8
$ bundle config build.therubyracer --with-v8-dir=$(brew --prefix v8@3.15)
$ bundle install
❯ bin/rails s
=> Booting Puma
=> Rails 6.0.2.1 application starting in development
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 4.3.1 (ruby 2.6.5-p114), codename: Mysterious Traveller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://127.0.0.1:3000
* Listening on tcp://[::1]:3000
@iamajvillalobos
iamajvillalobos / gist:df61a7d22ba75dd18a3fe3e9cc19fa50
Created January 26, 2020 15:32
Disable VSCode annoying popup hints
Add this on in settings.json
```
"editor.parameterHints": false,
```
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