Skip to content

Instantly share code, notes, and snippets.

Will tavurth

Block or report user

Report or block tavurth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lisp.js
const inputString = '(console.log (add 3 5 8 123 (minus 32 2 2 2)))';
const commands = {
'console.log': console.log,
inc(a, b) {
return Number.parseInt(a) + Number.parseInt(b);
},
dec(a, b) {
return Number.parseInt(a) - Number.parseInt(b);
},
View gist:ff3935ee8aec020fd4aef52919edafae
// foo(foo(bar))blim => foobaroofblim
function reverse(string) {
return string
.split('')
.reverse()
.join('');
}
function checkRecursion(input) {
View rateLimiter.js
class Forbidden extends Error {
constructor(message, status = 403) {
super(message);
this.status = status;
}
getStatus() {
return Number.parseInt(this.status);
}
@tavurth
tavurth / cl-sdl2.lisp
Last active Oct 9, 2017
cl-sdl2 test suite
View cl-sdl2.lisp
(ql:quickload :sdl2/examples)
(ql:quickload :glkit-examples)
(ql:quickload :sdl2kit-examples)
(defpackage :test
(:use :cl)
(:export :*is-new* :try-call))
(in-package :test)
(use-package :kit.gl.test)
@tavurth
tavurth / Assert_binsearch.pl
Last active Jun 7, 2016
Binary search task for sms-online.com
View Assert_binsearch.pl
#! /usr/bin/perl
use strict;
use warnings;
use ImyaFamiliyaLatinitseyFindIndex;
# Make sure that we have the say command availible
sub say { print @_, "\n" }
# Create a class instance
@tavurth
tavurth / AsynchronousLoading.pl
Created Jun 7, 2016
Coding test for sms-online.com
View AsynchronousLoading.pl
#! /usr/bin/perl
=begin comment
Construct a console-based application using the framework AnyEvent which takes a list of URLs on STDIN and calls them all at once in asynchronous mode.
Display the responses as they are received and statistics for each call rate slashes after the completion of all calls.
=cut
use strict;
You can’t perform that action at this time.