Skip to content

Instantly share code, notes, and snippets.

View mbifulco's full-sized avatar
🍱
Hungry (always)

Mike Bifulco mbifulco

🍱
Hungry (always)
View GitHub Profile
@ciiqr
ciiqr / zod-optional-null.ts
Last active April 24, 2024 15:30
zod optional/nullable/nullish differences
// zod schema
z.object({
// valid if string or:
optional: z.string().optional(), // field not provided, or explicitly `undefined`
nullable: z.string().nullable(), // field explicitly `null`
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined`
});
// type
{
@gatsbyjs-employees
gatsbyjs-employees / Open letter to the Gatsby community.md
Last active February 23, 2021 00:24
Open letter to the Gatsby community

To the Gatsby Community,

We want to start by specifically thanking Nat Alison. We support her and commend her bravery in speaking out. It is not easy to stand alone. What she experienced at Gatsby was unacceptable and speaks to wider issues. We thank her for putting pressure on the company to fix them. We vow to double down on those efforts.

While we have worked hard to give feedback and help create a healthy work environment over the past few years, change has been far too slow and the consequences have been real. The previous weeks have intensified the need for rapid change by increasing employee communication and allowing us to collectively connect some dots. We are just as outraged. As a result, we have posed a series of hard questions to management as well as a list of concrete actions they need to take.

Kyle Mathews' public apologies to both Nat Alison and Kim Crayton are small actions swiftly taken that signal the possibility for change but don't speak to the systemic issues that must be addressed.

@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active March 24, 2024 12:22
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@gmolveau
gmolveau / fathom_to_heroku.md
Last active July 11, 2020 18:06
How to push Fathom analytics - https://github.com/usefathom/fathom to Heroku

Deploy Fathom on Heroku

Requirements

  • heroku cli (logged in)
  • git
  • curl
  • wget
  • tar are required
  • ~ openssl is required to generate the secret_key, but you're free to use what you want
var userRef = ref.child(‘users/’ + userId);
var userTransactionsRef = ref.child(‘transactions/’ + userId);
Promise.all([
 userRef.once(‘value’),
 userTransactionsRef.once(‘value’)
]).then(function (snaps) {
 var user = snaps[0].val();
 var userTransactions = snaps[1].val();
});
@Atlas7
Atlas7 / remove_postgres_on_mac_os.md
Last active March 23, 2023 13:02
Note - How completely uninstall PostgreSQL 9.X on Mac OSX

This blog post has helped me clean up my postgres development environment on Mac. So making a copy!

How completely uninstall PostgreSQL 9.X on Mac OSX

This article is referenced from stackoverflow:

If installed PostgreSQL with homebrew , enter brew uninstall postgresql

If you used the EnterpriseDB installer , follow the following step.
@rt2zz
rt2zz / excerpt.js
Created November 29, 2015 21:19
disable persistStore in node environment
if (typeof self === 'object') persistStore(store)
@mbifulco
mbifulco / gist:2ad8529ca154d73c2d69
Created October 11, 2015 20:26
Open EdX certificate generation javascript
<p id="verify_button_by_clicking_msg">By clicking the button below, you assert that you have completed the course in its entirety.</p>
<p><input type=button value="Yes, I Agree." id="User_Verify_Button" style="margin-bottom: 20px;" /></p>
<p class="verify-button-success-text" style="font-weight: bold; color: #008200;"></p>
<script type="text/javascript">
var success_message = "Your grading and certification request has been received, <br />if you have passed, your certificate should be available in the next 20 minutes.";
var failure_message = "We're sorry; users who haven't created accounts and registered for the course may not receive Statements of Accomplishment.";
// for actual value of username, use scraped_username.split(':')[1].trim(); to get actual value
@mbifulco
mbifulco / function.js
Created August 25, 2015 19:10
jquery dictionary
//characters we want to replace:
/*
< with &lt;
> with &gt;
*/
var jsob =