Skip to content

Instantly share code, notes, and snippets.

View lcenchew's full-sized avatar
🤓
keep learning

lcenchew

🤓
keep learning
View GitHub Profile
@lcenchew
lcenchew / createPDF.gs
Last active May 24, 2024 16:15 — forked from andrewroberts/createPDF.gs
Merges values from Google Sheet into Docs and create Doc or PDF #snippets
//
// Create a PDF by merging values from a Google spreadsheet into a Google Doc
// ==========================================================================
//
// Demo GSheet & script - http://bit.ly/createPDF
// Demo GDoc template - 1QnWfeGrZ-86zY_Z7gPwbLoEx-m9YreFb7fc9XPWkwDw
//
// Config
// ======
@lcenchew
lcenchew / disable.sh
Last active November 7, 2021 11:26
Disable bunch of #$!@ in Catalina #snippets #notes
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@lcenchew
lcenchew / bookmarkleting.md
Created June 27, 2020 09:46 — forked from caseywatts/bookmarkleting.md
Making Bookmarklets #snippets

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.

This guide will walk you through creating your first bookmarklet. For a more thorough guide check out the great website Bookmarklets - Browser Power.

Some bookmarklets are pretty cool. Become a spaceship that shoots and destroys elements on the webpage you're on with Kick Ass. Or make pages rainbow and sparkly with Cornify.

@lcenchew
lcenchew / Printliminator.html
Last active July 31, 2020 03:54 — forked from Mottie/Change-last-url-value.html
Useful Bookmarklets #snippets
<!DOCTYPE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<DL>
<DT><A HREF="https://css-tricks.com/examples/ThePrintliminator/">Printliminator</A></DT>
<DT><A HREF="javascript:/*PRINTLIMINATOR*/(function(){function loadScript(a,b){var c=document.createElement('script');c.type='text/javascript';c.src=a;var d=document.getElementsByTagName('head')[0],done=false;c.onload=c.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;b()}};d.appendChild(c)}loadScript('//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2',function(){loadScript('https://css-tricks.com/examples/ThePrintliminator/js/printliminator.js',function(){printlimator()})})})()" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAC/VBMVEUAAABYb293Ojr29vbLy8v6+frIyMjOzs7////9/f34+Pjn5uahoZ/x8fHY2NilpaPvXV2dnJzp6enxX1/oWFjlVlbhJCTz9PTV1dXu7u7R0dHy8vKqDAzj4+Pc3NztW1ulpaWCgoLg4ODqWVnbICCmDAznJyeuD