Skip to content

Instantly share code, notes, and snippets.

const axios = require('axios');
const cheerio = require('cheerio');
const URL = require('url').URL;
const findPhoneNumbersInText = require('libphonenumber-js').findPhoneNumbersInText;
const urls = [
//new URL('http://localhost:8080/page1.html'),
new URL('https://www.house.gov/representatives'),
];
let visited = new Set();
@YaxelPerez
YaxelPerez / torquecli.py
Last active July 13, 2020 16:16
Torque CLI script. Depends on click and mwclient
from pathlib import Path
from urllib.parse import urlparse
import click
import mwclient
@click.group()
def cli():
pass
@cli.group('upload')

Keybase proof

I hereby claim:

  • I am YaxelPerez on github.
  • I am yaxelperez (https://keybase.io/yaxelperez) on keybase.
  • I have a public key whose fingerprint is C511 F3DA 9E40 D8D8 9090 2166 1345 918B BB97 DEF4

To claim this, I am signing this object:

<TaskerData sr="" dvi="1" tv="5.6">
<Profile sr="prof2" ve="2">
<cdate>1526356797310</cdate>
<edate>1540187127535</edate>
<flags>8</flags>
<id>2</id>
<mid0>3</mid0>
<nme>Morse Code Notification Vibration</nme>
<State sr="con0" ve="2">
<code>40830242</code>
@YaxelPerez
YaxelPerez / morse.js
Last active May 13, 2019 18:10
Generate morse code from text.
const morse_code = {
'a': '.-',
'b': '-...',
'c': '-.-.',
'd': '-..',
'e': '.',
'f': '..-.',
'g': '--.',
'h': '....',
@YaxelPerez
YaxelPerez / game.py
Created October 15, 2018 23:53
Space Invaders with Pygame
import sys
import pygame
# constants
VIEWPORT_W = 1000
VIEWPORT_H = 800
CANNON_W = 60
CANNON_H = 40
alias fzfl="ag --nobreak --nonumbers --noheading . | fzf"
@YaxelPerez
YaxelPerez / tmux.conf
Last active December 5, 2018 06:29
My tmux conf. Hacked from a bunch of stuff on the internet
# source theme
if-shell "test -f ~/.tmux.theme" "source ~/.tmux.theme"
# Use vim bindings
setw -g mode-keys vi
# Count sessions start at 1
set -g base-index 1
# don't rename windows automatically
@YaxelPerez
YaxelPerez / init.vim
Last active November 29, 2018 06:02
My vimrc but for neovim. Hacked together from examples on the internet.
" == VIM PLUG =================================================================
call plug#begin('~/.local/share/nvim/plugged')
" Syntax Highlighting
Plug 'crusoexia/vim-monokai'
" UI Prettyfying
Plug 'bling/vim-airline' " Changes the status line to use those arrow things
Plug 'vim-airline/vim-airline-themes' " Makes the airline at the bottom look nice and boring
Plug 'miyakogi/seiya.vim' " Make nvim bg color the same as the terminal's