Skip to content

Instantly share code, notes, and snippets.

@mayneyao
mayneyao / notion2blog.js
Last active February 29, 2024 18:01
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
const fs = require('fs');
const d3 = require('d3-dsv');
const path = require('path');
const yaml = require('js-yaml');
const toMarkdown = require('to-markdown');
d3.csvParse(
fs.readFileSync('./goodreads_library_export.csv', 'utf8')
).filter(row => {
return row['Exclusive Shelf'] !== 'to-read';
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@roddds
roddds / gist:a1f42bae598028ac7809
Last active December 8, 2020 22:46 — forked from raddevon/gist:67935d320ee9b726d19d
Adobe tries to strong-arm me into keeping Creative Cloud

To everyone who got here through Twitter or Facebook or Hacker News or whatever: THIS IS NOT ME.

The "Me" in this transcript is @raddevon, who shared his story first on reddit.


List of incompetent jackasses who can't check a source if their lives depended on it:

#pagelet_trending_tags_and_topics,
#pagelet_ego_pane,
.rhcFooterWrap {
display: none !important;
}
[data-reactid*="$interestsNav"],
[data-reactid*="$developerNav"],
[data-reactid*="$pagesNav"],
[data-reactid*="$listsNav"],
[data-reactid*="$eventsNav"],
{"data":[{"id":"1432750582849","json":"{\"enabled\":true,\"name\":\"Twitter: Hide Trends\",\"url\":\"\",\"updateUrl\":\"\",\"sections\":[{\"code\":\".module.trends { display: none; }\",\"domains\":[\"twitter.com\"],\"regexps\":[],\"urlPrefixes\":[],\"urls\":[\"\"]}]}"},{"id":"1432750082921","json":"{\"enabled\":true,\"name\":\"Twitter: Hide Promoted Tweets\",\"url\":\"\",\"updateUrl\":\"\",\"sections\":[{\"code\":\"*[data-promoted] { display:none; }\",\"domains\":[\"twitter.com\"],\"regexps\":[],\"urlPrefixes\":[],\"urls\":[\"\"]}]}"},{"id":"1432750240677","json":"{\"enabled\":true,\"name\":\"Twitter: Hide Who to Follow\",\"url\":\"\",\"updateUrl\":\"\",\"sections\":[{\"code\":\".wtf-module,\\n.WhoToFollow {\\n\\tdisplay: none !important;\\n}\",\"domains\":[\"twitter.com\"],\"regexps\":[],\"urlPrefixes\":[],\"urls\":[\"\"]}]}"},{"id":"1432750414498","json":"{\"enabled\":true,\"name\":\"Twitter: Hide Footer\",\"url\":\"\",\"updateUrl\":\"\",\"sections\":[{\"code\":\".Footer { display: none }\",\"domains\":[\"t
@Glutexo
Glutexo / current-date-and-time.applescript
Created September 14, 2014 12:48
AppleScript to get current date and time (YYYY-MM-DD HH:MM:SS). Usable as a Text Service in Mac OS X.
(*
The zero_pad function taken from:
http://www.nineboxes.net/2009/10/an-applescript-function-to-zero-pad-integers/
*)
on zero_pad(value, string_length)
set string_zeroes to ""
set digits_to_pad to string_length - (length of (value as string))
if digits_to_pad > 0 then
repeat digits_to_pad times
set string_zeroes to string_zeroes & "0" as string
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@turtlesoupy
turtlesoupy / nginx.conf
Created July 8, 2012 21:16
node.js upstream nginx config
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;