Skip to content

Instantly share code, notes, and snippets.

View picaq's full-sized avatar
🍓
🌸🌷🌹🌼🌸🌷🌹🌸

Mandy Chen picaq

🍓
🌸🌷🌹🌼🌸🌷🌹🌸
View GitHub Profile

Copy Pasta

  • copy & paste anything from the browser or console
  • allows tabs, soft returns and trailing spaces
    • due to the above, recommend .trim() on the content
  • document.execCommand() is outdated but so far more reliable since it does not require document focus
  • requires creating and destroying a textarea element
const copy = content => {    
@picaq
picaq / User Styles Sheets.md
Last active June 1, 2024 04:12
Custom CSS UserStyles

Custom CSS for better web browsing

Monaco Editors

  • eventually unifying all code editors into a single style spec
:root {
    --coderpad: 14;
    --leetcode: 12;
    --stackblitz: 12;
}
@picaq
picaq / Hacker News Reading.md
Last active April 18, 2024 10:49
Increase Readability for Hacker News (ycombinator)

Increase Readability for Hacker News

All

  • increase body type size to almost the same size as user-specified font size

Comments

  • limit line length to 48em or 87 characters or about 3.35 alphabets
  • add line height separation for readability

Front Page

@picaq
picaq / keypress Listener.md
Last active April 10, 2024 06:19
Keypress Event Listener

Keypress Listener

Press escape to trigger a function i.e. clear a state to default.

addEventListener("keydown", (e) => {
  if (e.keyCode === 27) {
      console.log('esc');
  };
 return;
@picaq
picaq / _Browser_Phone_Tree_Redialer.md
Last active March 10, 2024 08:37
Traversing Phone Trees via Google Voice

Traversing Phone Trees via Google Voice (Desktop)

todo: description Bookmarklet to dial programically via Google Voice

  • Use the search bar to store the next phone number you want to call.
    • If the search bar is empty it will call whatever number is stored in fallback .
    • This frees up the dial pad to traverse the phone tree (either programically or manually).
    • Feel free to edit the phone number and traversal options, inputs and delays in the search bar for the next call.
  • The scripts are saved as bookmarklets. To initiate, click the bookmarklet.
@picaq
picaq / userPaste.js
Created February 14, 2024 13:31
Simulate User paste event in browser
document.execCommand('insertText', false, 'input string value');
@picaq
picaq / _restyle_remarkable.md
Last active February 17, 2024 01:58
re-style remarkable2 sleep screens after update

Re-style Remarkable2 sleep screens after update

I got sick of reapplying the sleep screens on my remarkable after every single software update, so here are some aliases to facilliate the process. This also allows quickly swapping out different sleeping screens until you find one that you like.

Skip to: Usage:aliases.sh

  • I store my unix aliases in a separate aliases.sh file, but you can put them in your .bashrc or .zshrc instead.
  • All constants are in ALL CAPS. Update them with your own values before running anything.
  • The IP address to your remarkable may update after a software update. It can be stored in the following format:
@picaq
picaq / India_Tour.md
Last active January 23, 2024 00:43
India Tour

ITINERARY

Day wise Itenaray

  • 23.01.2024 Mumbai to Udaipur - By Flight
  • 23.01.2024 - Udaipur airport pick up and check in to hotel (as per check in timings of hotel), enjoy Udaipur city tour with Sahelion ki bari, City palace and Jagdish temple. As per time permits visit lake pichola and visit to fatehsagar lake, Overnight stay at Udaipur. (Dinner Included)
  • 24.01.2024 - After breakfast, check out from hotel and drive for airport, take a flight to Jaipur. Check in to jaipur hotel and drive for city tour with Jaipur city palace, Hawa Mahal, Jantar mantar, Birla mandir and visit to local market, Overnight stay at Jaipur. ( Dinner Included)
  • 25.01.2024 After breakfast visit to Amer Fort, Shopping at Johari Bazar, Tripolia Bazar and Chandpole Bazar and Light & Sound Show at Amer fort. Overnight stay at Jaipur. ( Dinner Included)
  • 26.01.2024 - After breakfast drive for Agra, visit Fatehpur sikri, Agra fort, Taj Mahal, Kinari bazaar, Tomb of Akbar the great, Overnight st
@picaq
picaq / Convert_Pinterest_Ad_to_Cat.md
Last active December 21, 2023 23:35
Convert Pinterest Ad to Cat

Convert Pinterest Ad to Cat

Convert pinterest ad images to random cat with the new CSS parent selector (technically a pseudoclass) :has()

  • Replace Ad images from “Home” tab with random cat image: from cataas.com
  • Maintains Ad text, link content and space
  • Filter pin ad with stylistic customizations
@picaq
picaq / Discord_Snippets.md
Last active November 27, 2023 01:32
Discord Snippets