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
$fn=40; | |
sz=10; | |
module ccube(x,y,z){ | |
gap=0.4; | |
ch=(sz+gap)*0.25; | |
xoffset = sz * x; | |
yoffset = sz * y; | |
zoffset = sz * z; |
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/bash | |
# Usage: col x x x | |
# where x is a column number or + to mean all following columns | |
# | |
# example: ls -al | col 6 7 9 | |
# example: ls -al | col 2 7 + | |
# example: ls -al | col -1 | |
# Here is a fun use... interleave lines from logs from several containers in timestamp order | |
# docker-compose logs --tail='all' -t | col 3 1 + | sort | col 2 + |
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
[alias] | |
pushu = !git push --set-upstream origin `git symbolic-ref --short HEAD` && git rpr | |
current-branch-name = !git rev-parse --abbrev-ref HEAD | |
current-branch-name-escaped = !git escape-url `git current-branch-name` | |
escape-url = "!f() { perl -MURI::Escape -e \"print uri_escape('"$*"');\"; }; f" | |
current-push-url = !git remote get-url --push origin | |
raise-pull-request = !sh -c \"echo -e \\\" \\nRaise a pull request here: \\n `git current-push-url`/pullrequestcreate?sourceRef=`git current-branch-name-escaped`&targetRef=master\\\"\" | |
rpr = raise-pull-request |
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
"complex_modifications": { | |
"rules": [ | |
{ | |
"manipulators": [ | |
{ | |
"description": "Change caps_lock to command+control+option+shift. Escape if no other key used.", | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": [ |
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
#Persistent | |
SetTitleMatchMode, 2 | |
SetTitleMatchMode, Fast | |
SetTimer, DrawRect, 50 | |
border_thickness = 20 | |
HideTime := A_TickCount | |
offset := 0 |
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
;;; everything.el --- Bridge to MS Windows desktop-search engine Everything | |
;; Copyright (C) 2012 Martin Weinig | |
;; Author: Martin Weinig <[email protected]> | |
;; Keywords: tools,windows,files,searching | |
;; Version: 0.1.5 | |
;; Filename: everything.el | |
;; Compatibility: GNU Emacs 23.x |
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
# View abbreviated SHA, description, and history graph of the latest 20 commits | |
l = log --pretty=oneline -n 20 --graph --abbrev-commit | |
# View the current working tree status using the short format | |
s = status -s | |
# Show the diff between the latest commit and the current state | |
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" |
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
if(ARGV.count < 2) | |
puts "Usage: #{__FILE__} file1.resx file2.resx" | |
exit -1 | |
end | |
if(`gem list`.scan(/nokogiri/).count == 0) | |
puts "You need to install nokogiri. Type 'gem install nokogiri' at a command prompt" | |
exit -1 | |
end |
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
# Run through all zip files to get log files | |
# Process log files => events | |
# Process events => (event + initial_state) => new_state => to state stream | |
# | |
require 'rubygems' | |
require 'zip' |
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
def has_arg(arg) | |
ARGV.include? arg | |
end | |
text = ARGV[0] | |
lines = text.scan(/.{0,40}(?:\b|$)/).map{|l| l.strip } | |
lines = (lines[-1] == "" ? lines[0...-1] : lines) | |
longest = lines.map{|l| l.length}.max | |
lines.map!{|l| l+ (" " * (longest - l.length))} |
NewerOlder