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
require "try-catch" | |
try { | |
function() | |
error('oops') | |
end, | |
catch { | |
function(error) | |
print('caught error: ' .. error) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; Solo freelancer's S-Corp tax optimization | |
;; | |
;; Assumes an unmarried single-shareholder and tons of other stuff. | |
;; I'm not a tax professional, no guarantees here, probably typos, etc. Come on! | |
;; Run with https://github.com/Z3Prover/z3 | |
;; | |
;; See also my notes at https://kevinlynagh.com/financial-plan/ |
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
fpm --maintainer 'Christian G. Warden <cwarden@xerus.org>' \ | |
--description 'Pentaho BI Server Community Edition' \ | |
--url http://community.pentaho.com/projects/bi_platform/ \ | |
--depends java6-runtime \ | |
--name pentaho-bi-server \ | |
--version 3.10.0 \ | |
--architecture all \ | |
--exclude /opt/pentaho/biserver-ce/pentaho-solutions/system/saiku \ | |
-s dir -t deb \ | |
/opt/pentaho/biserver-ce |
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/share/perl5/Slim/Utils/Misc.pm | |
+++ /usr/share/perl5/Slim/Utils/Misc.pm | |
@@ -857,7 +857,9 @@ | |
$target = ($target =~ /^\// ? $target : catdir($dirname, $target)); | |
if (-f $target) { | |
- return 0 if $target !~ $validRE; | |
+ # ignore the extension for symlinks. allows use of git annex repos | |
+ # cwarden@xerus.org - 2012-02-06 | |
+ # return 0 if $target !~ $validRE; |
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
$ javac MysqlProxyTest.java | |
$ mysql-proxy --plugins=proxy --proxy-lua-script="$(pwd)/mock-server.lua" --proxy-address 127.0.0.1:4040 --daemon | |
$ java -cp .:./mysql-connector-java-5.1.17-bin.jar MysqlProxyTest | |
Cannot connect to database server: | |
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure | |
The last packet successfully received from the server was 41 milliseconds ago. The last packet sent successfully to the server was 11 milliseconds ago. | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) | |
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) |
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
package main | |
import ( | |
"bufio" | |
"database/sql" | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
"os" | |
"reflect" | |
"strconv" |
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
#!/bin/sh | |
# read from stdin, write to a temp file, open the temp file in a browser, then delete it | |
tmpfile=$(tempfile); cat > $tmpfile; x-www-browser $tmpfile; rm $tmpfile |
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
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
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
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="//ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.8.3",function($,L){(function() { if ($('.dataRow:hidden').length) { $('.dataRow').show(); } else { $('.dataRow').hide(); $('.dataRow td:nth-child(7):empty').add('.dataRow td:nth-child(7):contains("N/A")').parent(':has(td:nth-child(8):empty)').show(); }})()}); |
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
/* Takes a function that optionally returns a promise, and debounces it, returning a | |
* promise to all callers. When the debounced function fulfills its promise or | |
* returns a non-promise, all callers get the result. | |
* Example: http://bit.ly/1btZC4f | |
*/ | |
var debounce = function(func, wait, immediate) { | |
var timeout; | |
var deferred = $.Deferred(); | |
return function() { | |
var context = this, args = arguments; |
NewerOlder