Skip to content

Instantly share code, notes, and snippets.

View dwaxe's full-sized avatar

Darwin Wu dwaxe

View GitHub Profile
@dwaxe
dwaxe / keybase.md
Last active September 9, 2019 19:01

Keybase proof

I hereby claim:

  • I am dwaxe on github.
  • I am dwaxe (https://keybase.io/dwaxe) on keybase.
  • I have a public key whose fingerprint is C6AB 7D49 E606 E3F0 2A72 6430 5B95 7E0D 705D 86BE

To claim this, I am signing this object:

@dwaxe
dwaxe / creditcardoffers.js
Last active March 8, 2025 00:02
Automatically activate credit card cash back offers
// Bank of America: https://secure.bankofamerica.com/customer-service/deals/
document.querySelectorAll('div.deal-logo').forEach(e => e.click())
// Chase: https://secure07a.chase.com/web/auth/dashboard#/dashboard/offers/merchantFundedOffers/requestAvailableMerchantOffers
const sleep = (milliseconds) => new Promise(resolve => setTimeout(resolve, milliseconds))
flyoutClose = document.querySelector('a#flyoutClose')
addOffer = document.querySelector('a.sixersoffers__cta')
while (addOffer.text === "Add to card") {
addOffer.click()
await sleep(3000)
@dwaxe
dwaxe / .zshrc
Last active July 13, 2017 05:26
my shell functions
function today () {
TODAYSTR=$(date "+%Y-%m-%d.txt")
if [ -f $TODAYSTR ];
then
vim +3 $TODAYSTR
else
date "+%B %d, %Y" > $TODAYSTR
echo "" >> $TODAYSTR
echo "" >> $TODAYSTR
echo "" >> $TODAYSTR
@dwaxe
dwaxe / today
Created February 24, 2017 11:24
fish function to create today's diary entry
function today
set todaystr (date "+%B%d.txt")
if test -e $todaystr
vim +3 $todaystr
else
date "+%B %d, %Y" >$todaystr
echo \n\n >>$todaystr
vim -c 'startinsert' +3 $todaystr
end
end
# Compiles .txt files into a single .txt in the correct date order
# File name format: [Month][Day].txt
# File content should end in a newline
cat December[1-3][1-9].txt > all.txt
cat January[1-9].txt >> all.txt
cat January[1-3][1-9].txt >> all.txt
cat February[1-9].txt >> all.txt
# cat February[1-2][1-9].txt >> all.txt
# cat March[1-9].txt >> all.txt