Skip to content

Instantly share code, notes, and snippets.

@stephancasas
stephancasas / macos-modifier-keys-dec-map.json
Last active February 21, 2024 10:34
macOS Modifier Keys Decimal Values Map
{
"65536": [
"alphashift"
],
"131072": [
"shift"
],
"196608": [
"alphashift",
"shift"
@dvessel
dvessel / F-Zero-Sand-Ocean-Intro.dtm
Last active September 4, 2023 19:30
Dolphin graphics backend performance comparison.
@dvessel
dvessel / G2ME01.sh
Last active November 23, 2022 21:30
Command line launcher for Dolphin emulator. (MacOS)
#!/bin/zsh
# Metroid Prime 2
ignore_dir="$dump/- ignore"
linked_dir="$dump/- linked"
review_dir="$dump/- review"
mkdir -p $ignore_dir $linked_dir $review_dir $load
ln -sf $linked_dir $load
@dvessel
dvessel / link-loaded-textures
Last active November 23, 2022 21:30
Throw it into a bin path, cd into it and `chmod +x link-loaded-textures`.
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}
@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active April 7, 2024 07:55
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation

Install XHProf

Pear

pear upgrade PEAR
pecl install xhprof-0.9.2

From source

@remy
remy / hang.js
Created November 30, 2012 13:23
How to hang JavaScript (useful - to me - for slowing down code and testing)
function hang(n) {
var x = new XMLHttpRequest();
x.open('GET', 'http://hang.nodester.com/script.js?' + n, false);
x.send();
}
// usage: hang(2 * 1000);
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }