Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tdeekens's full-sized avatar

Tobias Deekens tdeekens

View GitHub Profile
@danpetitt
danpetitt / esmodules.md
Last active April 21, 2024 21:23
Typescript, Jest and ECMAScript Modules

Typescript, Jest and ECMAScript Modules (ESM)

Package.json

Add the type property to package.json to ensure modules are supported:

{
  "type": "module",
}
@KoryNunn
KoryNunn / handshake-airdrop.md
Last active March 12, 2024 07:03
Handshake airdrop for github users.

Had 15 github followers in 2019? You can get about $4kAUD of crypto for minimal effort.

Explain this scam

That's legitimately a good default position to hold, however, in this case, the free money is a function of time, and not only charity.

In February 2020, in order to promote Handshake (HNS) to developers, an airdrop was offered to any Github user with more than 15 followers. The Airdrop would give you 4246HNS, at the time worth around at $0.08USD per coin, for a total of $339.68USD, pretty generous!

Today, 4246HNS is worth around $4000 dollarydoos, and there are plenty of github users who haven't claimed theirs.

@paulolorenzobasilio
paulolorenzobasilio / git-is-merged
Last active April 23, 2024 13:40
Check if source branch has been already merged into destination branch
#!/usr/bin/env bash
#
# Check if source branch has been already merged into destination branch
# https://stackoverflow.com/questions/226976/how-can-i-know-if-a-branch-has-been-already-merged-into-master
#
git_is_merged () {
merge_destination_branch=$1
merge_source_branch=$2

Visual Studio Code shortcuts I use often

Navigation

Sidebar:

  • Cmd-Shift-F: search
  • Cmd-Shift-E: files

Navigating in current editor:

@jaydenseric
jaydenseric / .env
Created October 11, 2017 06:11
Custom fragment matcher and schema fetching script for `apollo-cache-inmemory`.
GRAPHQL_URI=http://localhost:3001/graphql
// install @types/react-redux and other nonsense
import * as React from 'react'
import { connect } from 'react-redux'
import { YourActualAppState } from './wherever-it-is.ts'
export function mapStateToProps({
whatever
}: YourActualAppState) {
return {
@matthieuprat
matthieuprat / README.md
Last active September 23, 2021 16:29
Until operator for Enzyme's shallow wrapper

Usage

import until from 'path/to/until'
import { shallow } from 'enzyme'

const EnhancedFoo = compose(
  connect(...),
  withHandlers(...),
 withContext(...)
@ericclemmons
ericclemmons / example.md
Last active February 22, 2024 16:18
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here

Minimum Viable Async with Node 6

With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.

This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async + await.

The promise

@gaearon
gaearon / index.js
Last active January 5, 2022 18:45
Breaking out of Redux paradigm to isolate apps
import React, { Component } from 'react'
import Subapp from './subapp/Root'
class BigApp extends Component {
render() {
return (
<div>
<Subapp />
<Subapp />
<Subapp />