Skip to content

Instantly share code, notes, and snippets.

@jgonera
jgonera / words
Created March 9, 2023 19:40
/usr/share/dict/words
This file has been truncated, but you can view the full file.
A
a
aa
aal
aalii
aam
Aani
aardvark
aardwolf
Aaron
@jgonera
jgonera / markdown-details-collapsible.md
Created March 1, 2023 02:54 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

How to

<details>
  <summary>## Click me</summary>
  
  ### Heading
  1. Foo
  2. Bar
     * Baz
 * Qux
"""
Generates per-file-ignores section for the .flake8 configuration file based on
flake8 run output (can be either piped using STDIN or read from the file as the
first argument to this script).
Use this to disable some linting in legacy code, but keep full linting for
newly written code.
"""
import fileinput
@jgonera
jgonera / vanguard-csv.js
Last active August 22, 2022 17:49
Save Vanguard activity (beyond last 18 months) as a CSV.
var timer = setInterval(() => {
document.getElementById('account-0-showMoreLink').click();
}, 1000);
clearInterval(timer);
function parse() {
const results = [];
document.querySelectorAll('#account-0-transaction-table > tbody > tr').forEach((node) => {
@jgonera
jgonera / robinhood-csv.js
Last active June 5, 2021 16:10
Save Robinhood transaction history as a CSV.
// This is a naive HTML scraper, using the API might be a better idea (https://medium.com/@bartclaeys/how-to-export-your-robinhood-stocks-fc8245b3d118)
var timer = setInterval(() => {
window.scrollTo(0,document.body.scrollHeight);
}, 1000);
clearInterval(timer);
function parse() {
const results = [];
// without TypeScript (not tested)
module.exports = {
root: true,
extends: [
'airbnb',
'airbnb/hooks',
'plugin:import/errors',
'plugin:import/warnings',
'prettier',
'prettier/react',
function googleCalendarHoliday() {
var fromDate = new Date('2017-12-19T00:00:00-08:00');
var toDate = new Date('2018-01-01T23:30:00-08:00');
var calendarId = "your@gmail";
//Logger.log(CalendarApp.getAllCalendars().map(function(c) { return c.getId() }));
var calendar = CalendarApp.getCalendarById(calendarId);
var events = calendar.getEvents(fromDate, toDate);
Logger.log('Events: ' + events.length);
for (var i = 0; i < events.length; i++) {

Dependency mess in Ruby gems

I decided to follow up on my email about requires vs. autoload in Ruby. I thought I'd do more research to figure out how to best manage requiring code in a Ruby gem. I decided to take a look at a few popular Ruby projects to get inspired.

The results are... not inspiring.

Projects

Bundler

Check dates of an image

exiftool file.jpg | grep Date

Shift dates by +7 years, 10 months, 20 days of all files in current directory

exiftool "-AllDates+=7:10:20 0" -overwrite_original .
describe('Airbnb', function(){
it('opens login modal', function(){
cy.visit('http://www.airbnb.com');
cy.title().should('include', 'Vacation');
//cy.pause();
cy.get('#new-header > div:nth-child(3) > a').click();
cy.get('#signin_email').type("bob@bobsserver.com");