Skip to content

Instantly share code, notes, and snippets.

View amalitsky's full-sized avatar
⛰️
Climb the mountain

Alexander Malitsky amalitsky

⛰️
Climb the mountain
View GitHub Profile
@amalitsky
amalitsky / campground-checklist.md
Last active July 5, 2023 18:49
Campground Checklist

Campground Checklist

Living Quarters

  • tent
  • sleeping bag
  • mattress
  • table light
  • small hammer
  • chairs
  • ear plugs
@amalitsky
amalitsky / track-day-checklist.md
Last active April 6, 2024 05:59
Track day checklist

Track day checklist

Preparation

  • check oil level
  • bleed brakes
  • track tires on
  • track brake pads on

Driver Gear

  • helmet
@JohnAlbin
JohnAlbin / _README.md
Last active March 18, 2024 09:25 — forked from clarkdave/createPages.ts
TypeScript + Gatsby config and node API

README

  1. When Gatsby starts up, it will read gatsby-config.js first.
  2. As you can see below, we use that file to require('ts-node').register() which registers a TypeScript evaluator that will be used when Gatsby reads all other API Javascript files. In other words, we only need to do this once in our entire codebase and not in other Gatsby files like gatsby-node.js.
  3. Our gatsby-config.js re-exports all the exported variables available in gatsby-config.ts.
@reecelucas
reecelucas / useScrollBlock.js
Last active December 17, 2024 13:11
React hook to enable/disable page scroll
import { useRef } from 'react';
const safeDocument = typeof document !== 'undefined' ? document : {};
/**
* Usage:
* const [blockScroll, allowScroll] = useScrollBlock();
*/
export default () => {
const scrollBlocked = useRef();
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active November 25, 2025 17:47
set -e, -u, -o, -x pipefail explanation
@CollinChaffin
CollinChaffin / How_to_disable_ATT_DNS_Redirection.md
Created August 29, 2018 21:26
How to disable the very little-known AT&T setting that can appear to hijack your home DNS lookups and redirect to 104.239.207.44

How to disable the very little-known AT&T setting that can appear to hijack your home DNS lookups and redirect to 104.239.207.44

Issue

DNS queries on home network suddenly resolving hosts to 104.239.207.44.

Symptoms

You will see SPORADIC mis-resolutions of EVERYTHING to that 104.239.207.44 address if their crappy router happens to hear your PC's DHCP request - EVEN IF ANOTHER DHCP SERVER ON THE NETWORK assigns the ultimate address.

@zorrodg
zorrodg / LICENSE
Last active November 30, 2023 19:37
CLI Integration Test Helper
MIT License
Copyright © 2019 Andrés Zorro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@clarkdave
clarkdave / createPages.ts
Created April 15, 2018 13:11
TypeScript + Gatsby node API
import { resolve } from 'path'
import { GatsbyCreatePages } from './types'
const createPages: GatsbyCreatePages = async ({
graphql,
boundActionCreators,
}) => {
const { createPage } = boundActionCreators
const allMarkdown = await graphql(`
@dima117
dima117 / task.md
Last active September 2, 2021 19:05

Упражнения

  1. Сортировка пузырьком
  2. Сортировка выбором
  3. Сортировка вставками
  4. Обход дерева в глубину
  5. Обход дерева в ширину
  6. Баланс скобок в строке ({[
  7. Найти все простые числа от 1 до N
  8. Бинарный поиск в отсортированном массиве
@debovis
debovis / package.json
Last active January 16, 2024 14:13
How to debug gatsby and reactjs with webstorm
{
"name": "project-name",
"version": "1.0.0",
"description": "",
"main": "n/a",
"scripts": {
"serve": "gatsby develop -p 5000",
"dev": "node $NODE_DEBUG_OPTION ./node_modules/.bin/gatsby develop -p 5000",
}
}