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
# - start a clean shell with `zsh -f` | |
# - `source` this file | |
# - `a -<tab>` WILL show color | |
# - `a --<tab>` will NOT show color | |
# - `b -<tab>` will NOT show color | |
# - `c <tab>` will NOT show color | |
# if you uncomment the line after "YYY", ALL examples WILL show color | |
# first example shows up as expected (only option is red, rest is normal) |
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 d94859fa294d9974563b48195b7430a36c15d651 Mon Sep 17 00:00:00 2001 | |
From: OrangeRaven <apfelsinenhain@gmx.de> | |
Date: Thu, 19 Dec 2013 01:45:16 +0100 | |
Subject: [PATCH] Add option option for minimum file size ( `-m _size_` ) ... | |
don't check files smaller than this. | |
--- | |
src/duff.c | 16 ++++++++++++++-- | |
src/duffdriver.c | 6 +++++- | |
2 files changed, 19 insertions(+), 3 deletions(-) |
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
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 75b6077..d969bc3 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -10,7 +10,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | |
include_directories(/opt/homebrew/include) | |
link_directories(/opt/homebrew/lib) | |
- set(TARGET_LIBS argp) | |
endif() |
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 ruby -w | |
class String | |
def starts_with?(prefix) | |
prefix.respond_to?(:to_str) && self[0, prefix.length] == prefix | |
end | |
end | |
HEADER_REGEX = /^#import\s+["<](.*)[">]/ |
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 ruby | |
require 'uri' | |
def params_valid? | |
lengthOkay = [2,3].include? ARGV.length | |
revOkay = ARGV[0].to_i.to_s == ARGV[0] | |
lengthOkay && revOkay | |
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
// Usage: | |
// Basically, there are two ways to use this, either just invoke it via | |
// modifierKeyState | |
// and the exit code will be a bit mask for the state of the modifier keys, | |
// or: | |
// modifierKeyState command | |
// modifierKeyState shift alt | |
// exit code 0 means the specified keys (and only those!) have been found | |
// exit code 1 means the key was either not pressed, or other keys have been pressed as well | |
// Lastly: |
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 you use Safari and CMD+Click on a page to open it in a background tab, | |
the Safari History doesn't register the final URL, only the first step. | |
Leading to lots of links named "http://www.google.com/url?....12ASDF8234" | |
in your history, thus making it useless. | |
To fix this, one can change the Info.plist of Detox to also include the domains: | |
www.google.com, www.google.co.uk, www.google.XYZ, ... | |
( "www.google.*" apparently is an invalid pattern) | |
And add the following piece of code to end.js: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title> | |
Sieve of Eratosthenes using CSS3 selectors (+ some JS) | |
</title> | |
<style type="text/css"> | |
#sieve { | |
background-color: #EEE; |
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 ruby -U | |
# fetch available Railscasts transcripts ( ASCIIcasts ); use existing PDF where available | |
# original concept: https://github.com/korin/casts/blob/master/asciicasts/fetch.rb | |
# get wkhtmltopdf from: http://code.google.com/p/wkhtmltopdf/downloads/list | |
require 'uri' | |
require 'open-uri' | |
require 'nokogiri' | |
require 'pdfkit' |