Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Javier Godoy Núñez rotvulpix

🎯
Focusing
View GitHub Profile
@rotvulpix
rotvulpix / cleanTwitter.js
Created Oct 18, 2021
Clean your twitter feed (remove accounts who haven't tweeted in more than 3 months)
View cleanTwitter.js
import Twit from 'twit'
const config = {
consumer_key: 'something',
consumer_secret: 'something',
access_token: 'something',
access_token_secret: 'something',
}
let cursor
@rotvulpix
rotvulpix / validarRUT.html
Last active Aug 19, 2021
HTML5 Chilean RUT Validator
View validarRUT.html
<!doctype html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Validador de RUT HTML5</title>
</head>
<body>
<form>
<input type="text" id="rut" name="rut" required oninput="checkRut(this)" placeholder="Ingrese RUT">
<button type="submit">Validar RUT y Enviar Form</button>
@rotvulpix
rotvulpix / visaAppointmentWaitTimes.js
Created Jun 22, 2020
Get all Visa Appointment Wait Times in US Consulates at once
View visaAppointmentWaitTimes.js
# 1. Get into this page: https://travel.state.gov/content/travel/en/us-visas/visa-information-resources/wait-times.html
# 2. Execute the Script
# 3. Make sure all XHR requests are done
# 4. Do a console.table(items) to see the data
var items = []
var getAllData = () => {
var dataUrl = "https://travel.state.gov/content/travel/resources/database/database.getVisaWaitTimes.html";
var dataAppid = "VisaWaitTimesHomePage";
View nginx-forward
server {
server_name server.domain.com;
location / {
proxy_pass http://127.0.0.1:8080;
}
listen 80;
}
View rails-docker-buildspec.yml
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION)
- docker pull $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
build:
commands:
View Rails Dockerfile
FROM ruby:2.7.0
# Install Linux Dependences
RUN apt-get update -qq && apt-get install -y build-essential default-mysql-client
# Set Environmental Variables
ENV APP_HOME /tukwila
# Set Workdir
RUN mkdir $APP_HOME
View docker-pull.sh
#!/bin/bash
prefix=<account>.dkr.ecr.us-west-2.amazonaws.com
region=us-west-2
case $1 in
tukwila)
repository=tukwila
tag=tukwila_i
port_inside=3000
port_outside=8080
;;
View mysql2 gem in Catalina
brew install openssl
brew install mysql
gem install mysql2 --source 'https://rubygems.org/' -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
View config.fish
set -gx PATH /Users/rotvulpix/.rvm/bin $PATH
set -gx LDFLAGS $LDFLAGS "-L/usr/local/opt/zlib/lib"
set -gx CPPFLAGS $CPPFLAGS "-I/usr/local/opt/zlib/include"
# For pkg-config to find zlib you may need to set:
set -gx PKG_CONFIG_PATH $PKG_CONFIG_PATH "/usr/local/opt/zlib/lib/pkgconfig"
# GIT
# Aliases
alias git=hub
View gist:4a495a5b09b449602d692e8677e4cd22
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rango_a_calcular As Range
Set rango_a_calcular = Range("D3:F12")
If Not Application.Intersect(rango_a_calcular, Range(Target.Address)) Is Nothing Then
For i = 1 To rango_a_calcular.Rows.Count
Dim fila_actual As Integer
Dim medida_2 As Integer
Dim medida_3 As Integer