Skip to content

Instantly share code, notes, and snippets.

View legumbre's full-sized avatar

Leonardo Etcheverry legumbre

  • GlamST / Ulta
  • Montevideo, Uruguay
View GitHub Profile
@legumbre
legumbre / main-client.lua
Last active August 29, 2015 13:56
knetwork Server and Client | love
-- client --
-- - Launch the server.
-- - Fire up repl, then try:
-- a_client:send({a="foo", b="bar"})
-- - server responds with:
-- {a="foo", b="bar", ECHO="ECHO!"}
require "repl"
local serpent= require "serpent"
local knet= require "knetwork"
(add-hook 'eshell-mode-hook
(lambda () (define-key eshell-mode-map (kbd "C-c .")
(lambda () (interactive) (message "foo")))))
@legumbre
legumbre / *messages*
Created February 17, 2014 21:34
*messages* contents for M-x github-issues
Contacting host: api.github.com:443
Opening TLS connection to `api.github.com'...
Opening TLS connection with `gnutls-cli --insecure -p 443 api.github.com'...failed
Opening TLS connection with `gnutls-cli --insecure -p 443 api.github.com --protocols ssl3'...failed
Opening TLS connection with `openssl s_client -connect api.github.com:443 -no_ssl2 -ign_eof'...done
Opening TLS connection to `api.github.com'...done

Weird scroll-top-left behavior

/*
 * Conkeror 1.0pre (XULRunner 23.0, Darwin)
 * 
 */       
function scroll_horiz_complete (buffer, n) {
    var w = buffer.focused_frame;
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Google</ShortName>
<Description>Google Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,R0lGODlhEAAQAPfLAAATVikwdA8SnxUfgAsWpAAilholjxw4jBc7kwAlvQQ2sRMsoBUqqhMzuhY/vxw4tSgmiyM1mSUztiQ6sTE3sQ4qyxMxxRoyxiAuxR1CtBxJsBxasSJuuTFguBte0Rlf2xVc9h9W9xVjzxVr0gdj6BRh4R1o5yBcyiZbyydT1i9b2Ddb1iFY6CJg2Vpor1dzvEJu20Z0yi23QDy1REi2OUy0O1WzOVC4PU+tVUe5Sk2xQU2zRUO4UE21Ula2SmKEqWWF2HyPx2+a6X6e6Xqk1m+s78sUDs4UGdEQB9YfDdwaANEfHd0YEscjAM4mAM0qANIoD9IkGdslGswuItYgL4aP0ImP2YGZ36Opzaq2wq/S+rzX/7/e8MrS1MLO/sTb48rT8snX/83c89PZ+crq+cH1/9Dl/9Ln/93r/9fy/+Hf7P/42eDm/O7u/+T29uX2/eT2/+f4/+f5/+j/9u//8+3/9u7/9ur5/+j//+n//+v//u3//+7//e7//+////b66/T/6vX/6/f/7f/07fj/4fv/4Pj/5v/45v7/4/r+7/3/6fDw+Pfx//D/9/X/8fT/8/f/8ff/8/D///H///L8/fL///P///X7//b6/ff/+/T///b9//f///v19//w9v/09P/29v/x+f/y///z///1+v/1///2///3//j79P/58/z/8/z99/z/9v7/9P7/9vn7//v6//j9//n9//j///n///v//vv////4+v/5+//6+P/4///6/P/6/v/6///7///9+P/8+v/9+v
function sequence_item_by_name(sequence_name, group_name, item_name)
local seqitem
if group_name then
local idx = table.find(sequences.arcade, function (k, v) return v.name == group_name end)
seqitem = table.find(sequences[sequence_name][idx], function (k, v) return type(v) == "table" and v.name == _(item_name) end)
if seqitem then
return group_name, seqitem
end
end
;; advices
(defadvice narrow-to-region (around clone-when-narrowing-already-visible-buffer compile activate)
"Clone an indirect buffer when attempting to narrow the
contents of buffer visible in more than one window."
(save-excursion
(when (> (length (get-buffer-window-list (current-buffer) nil nil)) 1)
(let ((cloned-buffer (clone-indirect-buffer nil t) ))
(switch-to-buffer cloned-buffer t)))
ad-do-it))
# iPhoneOS6.0 SDK en Snow Leopard
cp -rv /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
cp -rv /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/6.0\ \(10A403\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
# Tuve que omitir el iPhoneSimulator porque de lo contrario me reventaba ibtool
# cp -rv /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
rm -f /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest
ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport/6.0\ \(10A403\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest
function sequence_item_by_name(sequence_name, group_name, item_name)
local idx = table.find(sequences.arcade, function (k, v) return v.name == group_name end)
return table.find(sequences[sequence_name][idx], function (k, v) return v.name == _(item_name) end)
end
function sequence_item_by_name(sequence_name, group_name, item_name)
return table.find(sequences[sequence_name][group_name],
function (k, item) return type(k)=="number" and item.name==_(item_name) and k end)
end