I hereby claim:
- I am abaez on github.
- I am baez (https://keybase.io/baez) on keybase.
- I have a public key whose fingerprint is 18E6 699F 387E 0CC7 6AE6 6B43 0978 8BCC E62B 55B3
To claim this, I am signing this object:
| #!/usr/bin/perl -w | |
| use File::Copy; | |
| use Cwd; | |
| # a simple rename scheme for the files. | |
| sub add0 { | |
| move($_[0], "$_[1]$_[0]"); | |
| } |
| #!/usr/bin/env lua | |
| function shuffle(tab) | |
| -- allocation of the random array | |
| local random_tab = {} | |
| for i=1,#tab do | |
| table.insert(random_tab, nil) | |
| end |
| #!/usr/bin/env lua | |
| --- returns the ppi from the resolution and diagonical inches of the screen. | |
| -- @func ppi | |
| -- @param inch is the diagonal inches of screen. | |
| -- @param width is the width of native resolution. | |
| -- @param height is the height of native resolution. | |
| function ppi(inch, width, height) | |
| return math.sqrt(width^2 + height^2) / inch -- ppi = pixels/inch | |
| end |
| --- checks if a value exist in a table. | |
| -- @function exist | |
| -- @param t a table to check. | |
| -- @param w a value to look for. | |
| function exist(t, w) | |
| for _, v in ipairs(t) do | |
| if v == w then | |
| return true | |
| end | |
| end |
| -- example of Memoize function with color generation. Saves speed! | |
| -- saves colors being used, and appends with new colors. | |
| local results = {} | |
| setmetatable(results, {__mode = "v"}) | |
| function create_RGB(r,g,b) | |
| -- defining key by the colors used | |
| local key = string.format("%d-%d-%d", r,g,b) | |
| local color = results[key] |
| use std::path::Path; | |
| use std::io::{File, BufferedReader}; | |
| /// opens a path to read a file. | |
| fn open(p: &str) -> BufferedReader<File> { | |
| BufferedReader::new(match File::open(&Path::new(p)) { | |
| Ok(f) => f, | |
| Err(e) => panic!("file error: {}", e) | |
| }) | |
| } |
| #!/usr/bin/python | |
| themes = "./themes/" | |
| from os import listdir, chdir | |
| from os.path import isfile, join | |
| from random import randrange | |
| from time import strftime | |
| import sys |
| --- making an example to push to webscript | |
| local icon = "https://pbs.twimg.com/profile_images/378800000410745178/8704302b5009e71d66fbc8f52cefc0bc_400x400.png" | |
| local link = "https://talks.slack.com/services/hooks/incoming-webhook?token=" | |
| local token = "" | |
| local fi = json.parse(request.form.payload) | |
| local fo = { | |
| user_email = fi.user.email, |
| [Desktop Entry] | |
| Type=Application | |
| Version=1.0 | |
| Encoding=UTF-8 | |
| Name=Textadept | |
| GenericName=Text Editor | |
| Comment=A simple and extensible text editor | |
| Exec=/usr/local/bin/textadept | |
| Icon=/usr/local/share/textadept/core/images/textadept.svg | |
| Terminal=false |
I hereby claim:
To claim this, I am signing this object: