Skip to content

Instantly share code, notes, and snippets.

View phocks's full-sized avatar
🦖
"Rrrrrraaaawwwwwr!!" —A dinosaur

Joshua Byrd phocks

🦖
"Rrrrrraaaawwwwwr!!" —A dinosaur
View GitHub Profile
// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @grant none
// @version 1.9.1
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js
// @downloadURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js
@PadraigK
PadraigK / generics.swift
Created May 12, 2022 00:21
Function signatures with generics
func makeOrReuse<T : IdentifierCellView>(_ cellType: T.Type, tableView: NSTableView) -> T
func makeOrReuse<T : IdentifierCellView>(tableView: NSTableView) -> T
// IMHO: The first signature is vastly superior even though the first argument is unncessary.
// Think about the call sites
let cell = makeOrReuse(ImageExportOptionCells.Toggle.self, tableView: tableView)
@shirakaba
shirakaba / vite-configuration.md
Last active July 8, 2023 03:19
How to configure Vite from svelte.config.js in SvelteKit projects

SvelteKit

In SvelteKit projects, SvelteKit wraps around Vite.

This example is for configuring path aliases, but you get the idea. There's a kit.vite property in svelte.config.js, and you'd configure vite through there.

https://kit.svelte.dev/faq#aliases

Vite's plugins should be API-compatible with Rollup, to my understanding.

{
"Darwin City": 800,
"Alawa": 810,
"Brinkin": 810,
"Casuarina (NT)": 810,
"Coconut Grove": 810,
"Jingili": 810,
"Lee Point": 810,
"Lyons (NT)": 810,
"Millner": 810,
@akrisiun
akrisiun / promise.js.md
Last active January 31, 2021 10:35
Javascript Polyfill promise for IE11 + script type="model" loader
@andywer
andywer / _readme.md
Last active March 7, 2024 05:52
React - Functional error boundaries

React - Functional error boundaries

Thanks to React hooks you have now happily turned all your classes into functional components.

Wait, all your components? Not quite. There is one thing that can still only be implemented using classes: Error boundaries.

There is just no functional equivalent for componentDidCatch and deriveStateFromError yet.

Proposed solution

@colingourlay
colingourlay / key.md
Created February 28, 2019 02:54
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@daverickdunn
daverickdunn / stream_listener.js
Last active August 22, 2021 22:34
Stellar JS SDK listen to server streamed EventSource events
const StellarSdk = require('stellar-sdk');
StellarSdk.Network.useTestNetwork(); // StellarSdk.Network.usePublicNetwork();
const server = new StellarSdk.Server('https://horizon-testnet.stellar.org'); // const server = new StellarSdk.Server('https://horizon.stellar.org');
// convenience method: returns a PaymentCallBuilder
// https://stellar.github.io/js-stellar-sdk/PaymentCallBuilder_PaymentCallBuilder.html#stream
// there are similar CallBuilders for other network events, this one is specific to payments
var stream = server
.payments()
@larsvers
larsvers / .block
Last active February 9, 2023 03:46
Military disputes - with d3-hexgrid
license: mit
height: 500
border: no
@pmkay
pmkay / top-brew-packages.txt
Last active May 12, 2024 15:20 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles