Skip to content

Instantly share code, notes, and snippets.

View aldodelgado's full-sized avatar
💭
Bring a spring upon her cable

Aldo Delgado aldodelgado

💭
Bring a spring upon her cable
View GitHub Profile
import sys
import os
import platform
import time
import gc
import micropython
import board
import microcontroller
def print_board_info():
printf "\e[48;5;0m \e[m
\e[48;5;0m \e[m
\e[48;5;0m \e[38;5;0;48;5;0m▄▄▄\e[48;5;0m \e[m
\e[48;5;0m \e[38;5;232;48;5;0m▄\e[38;5;239;48;5;0m▄\e[38;5;15;48;5;0m▄\e[38;5;250;48;5;0m▄\e[38;5;0;48;5;102m▄\e[38;5;0;48;5;15m▄▄▄▄▄▄▄▄\e[38;5;0;48;5;242m▄\e[38;5;254;48;5;0m▄\e[38;5;15;48;5;0m▄\e[38;5;234;48;5;0m▄\e[38;5;232;48;5;0m▄\e[48;5;0m \e[m
\e[48;5;0m \e[38;5;0;48;5;0m▄\e[38;5;15;48;5;0m▄\e[38;5;243;48;5;234m▄\e[38;5;0;48;5;15m▄\e[38;5;0;48;5;233m▄\e[38;5;0;48;5;0m▄\e[48;5;0m \e[38;5;0;48;5;237m▄\e[38;5;232;48;5;15m▄\e[38;5;7;48;5;232m▄\e[38;5;254;48;5;0m▄\e[38;5;232;48;5;0m▄\e[48;5;0m \e[m
\e[48;5;0m \e[38;5;0;48;5;0m▄\e[38;5;15;48;5;232m▄\e[38;5;0;48;5;15m▄\e[38;5;0;48;5;0m▄\e[48;5;0m \e[38;5;0;48;5;0m▄\e[38;5;232;48;5;15m▄\e[38;5;15;48;5;232m▄\e[38;5;232;48;5;0m▄\e[48;5;0m \e[m
\
@aldodelgado
aldodelgado / sms_subway_times.rb
Created July 21, 2023 21:04
SMS NYC subway train times
require 'twilio-ruby'
require 'net/http'
require 'json'
# Replace these variables with your actual Twilio credentials and phone numbers
TWILIO_ACCOUNT_SID = 'your_twilio_account_sid'
TWILIO_AUTH_TOKEN = 'your_twilio_auth_token'
TWILIO_PHONE_NUMBER = 'your_twilio_phone_number'
YOUR_PHONE_NUMBER = 'your_phone_number_to_receive_sms'
@aldodelgado
aldodelgado / peeps.js
Last active December 15, 2022 07:07
Object Builder for the birds
let admins = [];
let speakers = [];
let listeners = [];
(function(open) {
window.XMLHttpRequest.prototype.open = function() {
this.addEventListener("readystatechange", function() {
if (this.readyState == 4) {
if (this.responseURL.includes('AudioSpaceById')) {
let obj = JSON.parse(this.response);
# : << EOF
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
@aldodelgado
aldodelgado / namemash.py
Created February 4, 2021 08:40 — forked from superkojiman/namemash.py
Creating a user name list for brute force attacks.
#!/usr/bin/env python
import sys
import os.path
if __name__ == "__main__":
if len(sys.argv) != 2:
print("usage: {} names.txt".format((sys.argv[0])))
sys.exit(0)
if not os.path.exists(sys.argv[1]):
# XCode Command Line Tools
xcode-select --install
# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo PATH=/usr/local/bin:/usr/local/sbin:$PATH >> ~/.bash_profile
source ~/.bash_profile
brew tap homebrew/versions
@aldodelgado
aldodelgado / heroku_pg_db_reset.md
Created February 21, 2020 15:36 — forked from zulhfreelancer/heroku_pg_db_reset.md
How to reset PG Database on Heroku?

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)

One liner

heroku restart; heroku pg:reset DATABASE --confirm APP-NAME; heroku run rake db:migrate

@aldodelgado
aldodelgado / host
Created November 27, 2019 18:11
Host File
This file has been truncated, but you can view the full file.
# DuckDuckGo Hack
50.18.192.251 search.yahoo.com
###############################################
### ###
###############################################
# 0.0.0.0 0koryu0.easter.ne.jp
# 0.0.0.0 109-204-26-16.netconnexion.managedbroadband.co.uk
# 0.0.0.0 1866809.securefastserver.com
@aldodelgado
aldodelgado / README
Created October 24, 2019 01:59 — forked from andreaslillebo/README
Rails - models organization - Keep code structure in models consistent
# Keep code struture in models consistent
# Inspired by http://rails-bestpractices.com/posts/75-keep-code-struture-in-models-consistent
# One example: (From top to bottom)
associations
scopes
class methods
validates
callbacks
instance methods