This file contains hidden or 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
byte2str = (byte) -> | |
(String.fromCharCode(x) for x in byte).join('') | |
str2byte = (str) -> | |
(x.charCodeAt 0 for x in str) | |
TAPE_SIZE = 30000 | |
CELL_WIDTH = 16 | |
IO_WIDTH = 8 |
This file contains hidden or 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
module.exports = -> | |
@addCommand 'kata_rectangle_Code07_mamon', | |
args: '<texto>' | |
description: 'Imprime <texto> como un rectángulo. Dedicado al mamón de Code07.' | |
({nick}, text, to) => | |
to ?= nick | |
n = text.length/4 | |
if n % 2 |
This file contains hidden or 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
# Update 0.2 by alvaro-cuesta@GitHub | |
# | |
# Saw in http://www.nuxified.org/quakenet_q_challenge_response_auth_for_xchat | |
# | |
# - new protocol (uses HMAC-SHA-1) | |
# - added /QHASH <sha-1 hashed password> to auth via hash | |
# - added /QGEN <password> to generate a password hash (done noce) | |
# - autoauth (uses your network's NickServ password as a hash, leave blank to disable) | |
# - autocloak | |
# - autojoin channels once cloaked (see CHANNELS) |
This file contains hidden or 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
request = require 'request' | |
express = require 'express' | |
app = express() | |
############ | |
## CONFIG ## | |
############ | |
PORT = 3000 | |
#USER = 'xxx' | |
#PASS = 'xxx' |
This file contains hidden or 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
;; I came up with this off the top of my head (I'm thinking out loud here): | |
:groups {:user ['operator [:deny :all] | |
'whatis [:deny :all]] | |
:voicers ['operator [:allow "voice" "devoice"]] | |
:whatis-ops ['whatis [:allow "learn" "forget"]] | |
:admin []} | |
:users {"Jen" {:pass "123", :groups [:admin]} | |
"Jack" {:pass "456", :groups [:voicers :whatis-ops]} |
This file contains hidden or 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
;; raek's idea | |
(defn cool? [w] | |
true) ;; all words are cool | |
(def handlers | |
[[#(and (:small-word %) | |
(:first-word %)) #(.toUpperCase %)] | |
; you can even use functions as your predicate | |
[cool? #(.toLowerCase %)]]) |
This file contains hidden or 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
(ns example.image) | |
;; This | |
(defn generate-image [...] | |
...) | |
;; or this | |
(defn generate [...] | |
...) |