Skip to content

Instantly share code, notes, and snippets.

View CatChen's full-sized avatar

Cat Chen CatChen

View GitHub Profile
@CatChen
CatChen / browserlist.yml
Created July 7, 2023 05:37
GitHub Actions Workflow for Updating browserlist db
name: Update browserslist
on:
schedule:
- cron: '0 0 1 */3 *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
@CatChen
CatChen / mailchimp-popup-on-click-event.html
Last active September 17, 2019 07:11
MailChimp Popup on Click Event
<script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script>
<script type="text/javascript">
function displayDialog() {
document.cookie = "MCPopupClosed=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC";
document.cookie = "MCPopupSubscribed=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC";
window.dojoRequire(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us18.list-manage.com","uuid":"a7af3978c0ebeaff2b102af2f","lid":"68a7bcc816","uniqueMethods":true}) });
}
</script>
<script type="text/javascript">
if (document.querySelectorAll) {
set theRecipients to {{name:"Cat Chen", email:"catchen@catchen.me"}, {name:"Roli Chen", email:"roli@chen.cat"}, {name:"Elle Chen", email:"elle@chen.cat"}}
set theAttachment to (choose file with prompt "Select file for attachment...")
tell application "Mail"
repeat with theRecipient in theRecipients
set theMessage to make new outgoing message with properties {visible:true, subject:"Email with File Attachment", content:"Hi " & name of theRecipient & "," & linefeed & linefeed & "Check out the attachment in this email!" & linefeed & linefeed}
tell theMessage
make new to recipient at end of to recipients with properties {name:name of theRecipient, address:email of theRecipient}
make new attachment at end of last character of content with properties ¬
{file name:theAttachment}
end tell
@CatChen
CatChen / debug.jade
Created August 24, 2018 11:47
Jade debug partial for printing out any compile time data
// Usage:
// != partial('debug', { data: anything })
if environment !== 'production'
script
| console.log(!{JSON.stringify(data)});

Keybase proof

I hereby claim:

  • I am catchen on github.
  • I am catchen (https://keybase.io/catchen) on keybase.
  • I have a public key whose fingerprint is 3F72 245D 1270 2FB4 ACFE DFC1 7CF3 C8DB D257 32AD

To claim this, I am signing this object: