Skip to content

Instantly share code, notes, and snippets.

View lewdev's full-sized avatar

Lewis Nakao lewdev

View GitHub Profile
@cdleveille
cdleveille / Install⁄Update Xone
Last active May 2, 2024 23:50
Install or update xone driver for Steam Deck (desktop shortcut and bash script)
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=bash $HOME/xone_install_or_update.sh
GenericName[en_US]=
GenericName=
Icon=preferences-desktop-gaming
MimeType=
Name[en_US]=Install⁄Update Xone
Name=Install⁄Update Xone
@lewdev
lewdev / ipsum-generator.html
Last active July 22, 2022 22:44
Generate random Lorem Ipsum paragraphs.
<h1 style="margin:0">Ipsum Generator</h1>
<span id=b></span>
<button onclick="navigator.clipboard.writeText(o.value);">📋 Copy</button>
<textarea id=o style="display:block;width:100%;height:calc(100vh - 6rem)"></textarea>
<script>
const IPSUM = "suspendisse luctus nunc libero et varius tortor gravida sit amet aliquam nec turpis eget nibh ornare maecenas pulvinar velit neque sodales eu etiam posuere ac nisl ultrices pellentesque pretium purus diam quis finibus dui pharetra non consectetur sapien vestibulum arcu interdum phasellus vitae fringilla risus praesent elementum ut mattis proin est faucibus condimentum vel vestibulum justo molestie erat iaculis dapibus sem urna placerat blandit augue duis at quam odio sed mollis ligula in tempus id magna vehicula bibendum cursus tincidunt leo facilisis ut sollicitudin nulla consequat elit enim a efficitur mi aliquet scelerisque tempor donec dolor ipsum sed feugiat nunc viverra semper cras tellus venenatis convallis ante integer massa egestas interdum malesuada fames

Why I'll never use Affirm again

tldr: I'll never use Affirm again because when there are issues with their payment system that could severely impact your credit score for years, their customer support is unequipped to help and their underlying support infrastructure is poorly designed.

On Jan 3 2022, I purchase a product from a merchant for $271. As part of the purchase, I signed up for a 0% APR installment plan via Affirm to pay the balance in four equal payments over six weeks. The merchant ended up not shipping the product for over two months, by which time I had fully paid off the loan from Affirm, and they were unresponsive to my requests for a shipping date. Because of this, on Mar 10 2022 I initiated a chargeback with my bank (Chase) on the last loan payment, which I paid on Feb 15 2022. As soon as I initiated the chargeback, the merchant became responsive and shipped the product. On Mar 11 2022, I received the tracking number for the purchase and I called Chase to cancel the chargeback.

Since Ma

@kcranston
kcranston / postgres-jsonb.md
Last active May 15, 2024 20:24
intro to document stores in postgreSQL

Document stores in PostgreSQL

Notes for software engineering meeting presentation

What

  • mid to late 2000s: appearance of Document stores / NoSQL databases such as Mongo, Couch
  • Relational DBs now have support for document data: JSON in MySQL, JSON and JSONB in PostgreSQL
  • Focus on JSONB in Postgres (most full featured)
@adewes
adewes / README.md
Last active June 10, 2024 16:33
Borg Backup - Shell script to create regular backups (can e.g. be called hourly by cron).

Borg Backup Script

This is a little helper script to regulary back up your data using the Borg backup tool. I wrote this as I was frustrated with Deja-Dup, which does not allow me to exclude directories by pattern, hence I ended up with backups that were very large and took a really long time to create because they contained many directories with non-essential files (e.g. node modules or Python virtual environments). Borg backup is a simple tool that offers everything that Deja-Dup does and is easier to customize.

  • Put the script in your home folder and make it executable.
  • Call it regularly using e.g. cron (put e.g. "0 * * * * [your username] /home/[your username]/make_backup.sh" in your /etc/crontab - this will call the script every hour). Please note that the script will perform its own checking to see
[
{
"kana": "あ",
"roumaji": "a",
"type": "gojuuon"
},
{
"kana": "い",
"roumaji": "i",
"type": "gojuuon"