I hereby claim:
- I am frangio on github.
- I am frangio (https://keybase.io/frangio) on keybase.
- I have a public key ASBbMtbuaHvF_wEB2-erBEkWduHAvJ3kQzRAISn7zH5ONwo
To claim this, I am signing this object:
% This is an interpreter for the pure untyped lambda calculus. | |
% We represent lambda terms using De Bruijn indices. | |
term(var(I)) :- integer(I). | |
term(abs(M)) :- term(M). | |
term(app(M, N)) :- term(M), term(N). | |
% Lambda abstractions are the only values. |
#!/usr/bin/env lua | |
i3ipc = require 'i3ipc' | |
conn = i3ipc.Connection() | |
tree = conn:get_tree() | |
ws = {} | |
for _, w in pairs(tree:workspaces()) do | |
if w.focused then |
(function($) { | |
$.fn.viewportPosition = function() { | |
var a = this, b = a.offset().top - $(window).scrollTop(), c = a.offset().left - $(window).scrollLeft(); | |
return {top: b, left: c}; | |
}; | |
})(jQuery); |
#! /usr/bin/env ruby | |
begin | |
response = %x{ curl -u username:password --silent "https://mail.google.com/mail/feed/atom" } | |
fullcount = response.match(/<fullcount>(\d+)<\/fullcount>/)[1].to_i | |
message = fullcount > 0 ? fullcount.to_s + " new message(s)." : "No new messages." | |
rescue | |
message = "There was an error." | |
ensure | |
%x{ growlnotify "#{message}" -m "" --image "icon.png" } |
local unistd = require('posix.unistd') | |
local ltn12 = require('ltn12') | |
local _M = {} | |
-- creates a source from a file descriptor | |
function _M.source(fd, err) | |
if fd then | |
return function () | |
local chunk = unistd.read(fd, ltn12.BLOCKSIZE) -- [TODO] stat(fd).st_blksize? |
#!/usr/bin/env sh | |
echo "data:$(file -b --mime-type "$1");base64,$(base64 "$1")" |
h | |
x | |
s/$/0/ | |
x | |
: shift | |
/^(/ { | |
s/// | |
x | |
s/$/1/ | |
x |
I hereby claim:
To claim this, I am signing this object:
var TelegramBot = require('node-telegram-bot-api'); | |
var token = 'TOKEN'; | |
var bot = new TelegramBot(token, {polling: true}); | |
bot.getMe().then(function (me) { | |
console.log('%s on', me.username); | |
}); | |
bot.on('text', function (msg) { |