Skip to content

Instantly share code, notes, and snippets.

[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[diff]
tool = Kaleidoscope
[difftool]
prompt = false
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[mergetool]
@darknoon
darknoon / OutlineView.m
Last active September 6, 2016 05:11
This is the simplest way I could figure out how to make a view-based NSOutlineView
@interface AppDelegate : NSObject <NSApplicationDelegate, NSOutlineViewDataSource, NSOutlineViewDelegate>
@end
@implementation AppDelegate {
NSWindow *_w;
NSDictionary *_data;
}
@archon810
archon810 / BuildConfig.java
Last active September 28, 2022 15:17
Fake Virus Shield AV
package com.deviant.security.shield;
public final class BuildConfig {
public static final String BUILD_TYPE = "debug";
public static final boolean DEBUG;
public static final String FLAVOR = "";
public static final String PACKAGE_NAME = "com.deviant.security.shield";
public static final int VERSION_CODE = 4;
public static final String VERSION_NAME = "2.2";
@visioncan
visioncan / CasksInstall.sh
Last active December 29, 2021 01:56
CasksInstall
#!/bin/bash
# xcode command tool
xcode-select --install
# check
xcode-select -p
# homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@import Foundation;
@interface KKWatchAppNotificationCenter : NSObject
+ (instancetype)sharedCenter;
- (void)postNotification:(NSString *)key;
- (void)addTarget:(id)target selector:(SEL)selector name:(NSString *)notification;
- (void)removeObserver:(NSObject *)observer;
@end
@yurenju
yurenju / watch.js
Last active October 3, 2015 02:23
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
require('shelljs/global');
fs.watch('client', {recursive: true}, function(event, filename) {
exec('mocha -t 5000 --harmony --growl ' +
'test/test.' + path.basename(filename));
@uranusjr
uranusjr / better-python-env.md
Last active June 8, 2023 14:11
Toward a better Python installation

Toward a better Python installation

Meta

想要的特質

  • 不會太污染 PATH
  • 盡可能避免要求 root/admin 權限
  • 可以同時安裝多個版本(只需要到 minor,不須 patch)
  • 可以輕鬆啟動任意一個版本的 Python,不須多餘設定,版本之間也不會互相衝突