This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$set(date,%originaldate%) | |
$if(%albumsort%,,$set(albumsort,%album%))) | |
$set(albumsort,$if(%catalognumber%,%catalognumber% ,)%albumsort%) | |
$set(albumsort,$if(%originaldate%,%originaldate% ,)%albumsort%) | |
$unset(compilation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env perl | |
use v5.14; | |
use strict; | |
use warnings; | |
use List::Util qw{first}; | |
sub read_line { | |
my $line = scalar <>; | |
return () unless $line; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env perl | |
use v5.14; | |
use strict; | |
use warnings; | |
use List::Util qw{first sum}; | |
use IO::Handle; | |
sub debug(@) { | |
return unless $ENV{DEBUG}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 771818fab860a6e897f4046d67d8fd9949662977 Mon Sep 17 00:00:00 2001 | |
From: "Diogo Franco (Kovensky)" <diogomfranco@gmail.com> | |
Date: Sat, 25 Jan 2014 18:04:20 -0300 | |
Subject: [PATCH] Make fontconfig-2.11.0 less dumb on windows | |
Yes, fontconfig's indentation is that weird. | |
Adds the windows font directory to the default search path, stores | |
fontconfig cache files in a folder in the local application data folder. | |
This behaves correctly with roaming profiles and doesn't litter the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
#include <cmath> | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <xinput.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance force | |
#InstallKeybdHook | |
#UseHook On | |
; HACK: KBDDV.DLL doesn't deal with the IME keys, so map them by scancode | |
; Yen key: 07d, assign to \ :( | |
; Backslash key: 073, assign to ` | |
; Hankaku/Zenkaku key: working as tilde key, don't touch | |
; Muhenkan: 07B, disable IME | |
; Henkan: 079, enable IME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Search shell history with peco: https://github.com/peco/peco | |
# Adapted from: https://github.com/mooz/percol#zsh-history-search | |
if [ "$(which peco &>/dev/null && echo 'a' | peco --select-1)" = 'a' ]; then | |
function peco_select_history() { | |
local lbuf="$LBUFFER" | |
BUFFER= | |
zle -c -U "$(print -rl - $history | peco --layout=bottom-up --query "$lbuf")" | |
} | |
zle -N peco_select_history | |
bindkey '^R' peco_select_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ from 'jquery' | |
// jQuery Deferreds don't have a prototype, so patching them is more complicated | |
// than the native Promises. | |
const origDeferred = $.Deferred | |
const sym = module.hot && module.hot.data | |
? module.hot.data | |
: Symbol('deferred-finally') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import classNames from 'classnames' | |
// I am trying to write a React version of an internal library's component. | |
// They share the CSS and class names, so the internal library's jquery event handler will capture clicks, | |
// thus I have to use a ref and attach handlers directly to it. | |
class Test extends React.Component { | |
constructor (props) { | |
super(props) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Copyright (c) Microsoft Corporation. All rights reserved. | |
# Licensed under the MIT License. See License.txt in the project root for license information. | |
NAME="Code" | |
VSCODE_PATH="$(dirname "$(dirname "$(realpath "$0")")")" | |
ELECTRON="$VSCODE_PATH/$NAME.exe" | |
CLI="$VSCODE_PATH/resources/app/out/cli.js" | |
if [ "$OSTYPE" = "cygwin" ] && which cygpath &>/dev/null; then |