Skip to content

Instantly share code, notes, and snippets.

View NickyMeuleman's full-sized avatar
🏎️
When not coding, I'm simracing

Nicky Meuleman NickyMeuleman

🏎️
When not coding, I'm simracing
View GitHub Profile
@mdarrik
mdarrik / aoc-2021-day-17-math-explanation-part-1.md
Created December 18, 2021 04:42
A walkthrough of the mathematical solution to Advent of Code 2021, day 17, part 1

Getting the bounds for part 1

Some things we know about the problem:

  • We can treat x & y as mostly independent variables
  • When initial_y_velocity > 0, the velocity to reach y=0 again = -initial_y_velocity
    • We can see this in the example below, where initial_y_velocity = 2.
      1. From y=0 we move 2 points to y = 2
      2. From y = 2 we move 1 point to y = 3
  1. From y = 2 we move 0 points because velocity is 0
@bdougherty
bdougherty / README.md
Last active April 1, 2022 05:54
Play the Benny Hill theme song while installing npm modules

Add the function somewhere to your dotfiles. Works better if you npm install -g benny-hill first.

@kkemple
kkemple / .eslintrc.js
Last active July 18, 2023 21:51
Extract Schema from Gatsby
module.exports = {
extends: ["react-app"],
env: {
browser: true,
node: true,
jest: true
},
rules: {
"graphql/template-strings": [
"error",
1-In the github repo on Settings > Integration & Services, enable
2-Go to travisCI page and enable the repo
3-Configure the env variables on TravisCI so that it is not necessary to save credentials on github
-in the project Settings on TravisCI, add the entry for netlify site id: NETLIFY_SITE_ID - <site_id from .netlify file generated on netlify create>
-create a netlify access token for TravisCI
-On Netlify Dashboard, Go to Account Settings > OAuth Applications (https://app.netlify.com/account/applications) > Personal access tokens and press New Access Token
-Name it anything, but to make it easier the suggestion is name TravisCI.
-Generate it and COPY it - you won’t see it again!
-in the project Settings on TravisCI, add the entry for netlify personal access token generated for TravisCI: NETLIFY_ACCESS_TOKEN
4-Generate a .travis.yml file in the local repo