Skip to content

Instantly share code, notes, and snippets.

View marcj's full-sized avatar
🖌️
Data

Marc J. Schmidt marcj

🖌️
Data
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@marcus-sa
marcus-sa / client-and-server.spec.ts
Last active May 23, 2022 22:17
Deepkit WebSocket RPC Cloudflare Workers Interconnection
import { createTestingApp } from '@deepkit/framework';
import { ControllerSymbol, rpc } from '@deepkit/rpc';
import { entity } from '@deepkit/type';
import {
webSocketFetchRequestHandler,
CloudflareWorkerRpcWebSocketClient,
} from '../src';
// https://miniflare.dev/testing/jest
@sindresorhus
sindresorhus / esm-package.md
Last active April 23, 2024 09:02
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@sarimarton
sarimarton / crossover-howtocompile.md
Last active April 19, 2024 07:55 — forked from Alex4386/crossover-howtocompile.md
CodeWeavers CrossOver - How to compile from source! for macOS

UPDATE 2023-01-22 21:34:33

This guide was last tested on an Intel MacBook 2017. Since then it's unmaintained and won't be updated (I quit the game and bought a life-time crossover licence).


This has been forked from https://gist.github.com/Alex4386/4cce275760367e9f5e90e2553d655309

For the latest discussion, see the comments there.

@gcangussu
gcangussu / jest-resolver.js
Last active October 31, 2023 15:06
Custom Jest resolver to preserve symlinks. Useful for usage with Bazel. Requires `resolve` npm package.
const resolve = require('resolve');
/**
* @typedef {{
basedir: string;
browser?: boolean;
defaultResolver: (request: string, options: ResolverOptions) => string;
extensions?: readonly string[];
moduleDirectory?: readonly string[];
paths?: readonly string[];
@marcj
marcj / do-it.sh
Last active April 12, 2020 08:47
OSX PhpStorm, better performance - more FPS using OpenGL
cp /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions ~/Library/Preferences/WebIde*
echo -ne "\n-Dawt.useSystemAAFontSettings=lcd\n-Dawt.java2d.opengl=true" >> ~/Library/Preferences/WebIde*/phpstorm.vmoptions
@binwiederhier
binwiederhier / README.md
Last active January 27, 2018 08:31
OpenSSH 6.6p1 patch: AuthorizedKeysCommand with additional argument <fingerprint>

Make and run

apt-get source openssh-server
apt-get install libssl-dev 
cd openssh-6.6p1

# Apply patch
patch -p1 openssh/openssh-6.6p1/auth2-pubkey.c < auth2-pubkey.c.patch
@fritzy
fritzy / 1_triggers.sql
Last active April 7, 2024 20:07
Get table change notifications from Postgres as JSON
CREATE OR REPLACE FUNCTION table_update_notify() RETURNS trigger AS $$
DECLARE
id bigint;
BEGIN
IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN
id = NEW.id;
ELSE
id = OLD.id;
END IF;
PERFORM pg_notify('table_update', json_build_object('table', TG_TABLE_NAME, 'id', id, 'type', TG_OP)::text);
@DavidFrahm
DavidFrahm / gist:4409d6b74e46377e7be7
Created January 27, 2015 22:58
Ionic build iOS app for release, open in HockeyApp for deploying to team
#!/bin/bash
echo "Building Ionic/Cordova iOS release..."
ionic build --release ios
# Save current directory and cd to other dir
pushd platforms/ios/
# Build archive
xcodebuild -scheme "MyApp" -configuration Release clean archive
# Can also specify archive path: