Skip to content

Instantly share code, notes, and snippets.

View DaniGuardiola's full-sized avatar
🛠️
Creating stuff

Dani Guardiola DaniGuardiola

🛠️
Creating stuff
View GitHub Profile
@DaniGuardiola
DaniGuardiola / khan-academy-math-filter.js
Last active February 24, 2023 18:51
Khan Academy - math filter
/*
This is a script that can be dropped into the console of the Khan Academy
math page to filter their many courses by category.
It will also fetch and display the progress of the user on each course.
Usage: load https://khanacademy.org/math, open the console (F12), paste the
code, and hit enter.
You can customize the filters or the initially visible categories by editing
@DaniGuardiola
DaniGuardiola / components.sh
Last active July 31, 2020 11:11
Pop! OS: personal after-install setup script | execution: $ source <(wget -qO - pop-os.daniguardiola.me)
# NOTE: you can comment out any components you don't need
# but DO NOT change the order of the scripts
# development software
./vscode.sh # DO NOT COMMENT THIS LINE OR THE SCRIPT WILL CRASH! I'm working on a fix, sorry.
./tools.sh
./hyper.sh
./docker.sh
./python.sh
./rust.sh
@DaniGuardiola
DaniGuardiola / branch-bashrc.sh
Last active October 4, 2019 09:00
My custom bash prompt. It shows the branch and removes the machine name in the color version.
# Usage:
# In your ~/.bashrc file, first look for the
# "unset color_prompt force_color_prompt" line
# and disable it by commenting it.
# Then, paste this code at the end of the file
# (or anywhere below the line you just commented).
PS1=''
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1 /'
@DaniGuardiola
DaniGuardiola / humble_bundle_dl_books.js
Created January 1, 2019 19:52
Download Humble Bundle books
// IMPORTANT! This doesn't work properly yet, it's a WIP
// - Go to the library page and select "ebooks"
// - Copy and paste the code below into the Javascript console
// - Run X() to download all ebooks
// - Enjoy!
list = [...document.querySelector('.column.subproducts-holder').children]
x = n => {
@DaniGuardiola
DaniGuardiola / bitcoin-addresses-and-scripts.md
Last active February 11, 2022 19:03
Examples of mainnet bitcoin addresses and scripts
# ubuntu.daniguardiola.me - start
# fix for yarn global path
export PATH="$(yarn global bin):$PATH"
# fix ~/.local/bin path
export PATH="$HOME/.local/bin:$PATH"
# put android sdk tools on path
@DaniGuardiola
DaniGuardiola / tree-to-csv.js
Created June 26, 2017 15:45
Generate CSV dir tree (node script)
// Generate CSV dir tree
const Promise = require('bluebird');
const fs = require('fs-promise');
const _ = require('lodash');
const path = require('path');
// install dependencies in script dir
// npm install bluebird fs-promise lodash
@DaniGuardiola
DaniGuardiola / circle-in-rectangle.html
Last active February 2, 2016 10:56
[JAVASCRIPT] How to cover a rectangle with a circle when the circle's center is not at the same position as the rectangle's center
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Circle in rectangle</title>
</head>
<body>
<!--