Skip to content

Instantly share code, notes, and snippets.


Camilo clsource

View GitHub Profile
clsource / README.asciidoc
Created Apr 28, 2021
How to Extend Wren CLI with Go functions
View README.asciidoc

Wren CLI is the official project for a small command line application that embeds Wren. Serves as an example implementation.

If you want to use the exact version of this tutorial. See this commit.

In this simple exercise we will export a go function and use it inside the CLI as a new class.

The function will be a simple Http server that returns a message if we go to localhost:8080

clsource /
Last active Oct 28, 2020
Create a good looking HTML table of files inside a directory
#!/usr/bin/env python3
Version 2, December 2004
Copyright (C) 2020 Camilo Castro <>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
clsource / JSON.stringify.wren.js
Last active Sep 22, 2020
A simple JSON stringify for Wren language.
View JSON.stringify.wren.js
// the .js is only for syntax highlighter.
class JSON {
// Based on
static stringify(obj) {
if (obj is Num || obj is Bool || obj is Null) {
return obj.toString
if (obj is String) {

Code Challenge: Two Number Sum

Write a function that takes in a non empty array of distinct integers and an integer representing a target sum. If any two numbers in the input array sum up to the target sum, the function should return them in an array. If no two numbers sum up to the target sum, the function should return an empty array. Assume that there will be

Tests Cases

  • Sample input 1: [3,5,-4,8,11,1,-1,6], 10
clsource / Commit
Created Aug 26, 2020 — forked from brianclements/Commit
Angular Commit Format Reference Sheet
View Commit

Commit Message Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the Angular change log.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

clsource /
Last active Aug 16, 2020
Find the Outlier

Encuentra el 'outlier' de paridad

Dado un arreglo de enteros (con un mínimo de 3 elementos, pero puede ser bien grande), el cual está compuesto en su totalidad por números pares o impares, excepto por un elemento (el outlier), escriba un método que encuentre ese outlier.

Esta función debe ser implementada en JavaScript y no se pueden utilizar librerias externas. Completa la función en el archivo pregunta1.js.


[2, 4, 0, 100, 4, 11, 2602, 36]
Debería retornar: 11 (el único elemento impar)
clsource / .editorconfig
Created Aug 9, 2020
Example of Makefiles in Windows
View .editorconfig
root = true
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
indent_style = tab
clsource / permutations-in-array.js
Last active Jul 21, 2020
A solution to a problem with permutations in array
View permutations-in-array.js
// Camilo Castro <>
Given a numeric array. find the cardinality of the set where substracting (absolute)
every number pair inside the set, results 1, 0 or less.
array = [ 1,1,2,2,4,4,5,5,5]
View fizzbuzz.js
(() => {
const numbers = [0, 3, 5, 10, 15, 20, 25, 30];
const FIZZ = 3;
const FIZZ_WORD = "Fizz";
const BUZZ = 5;
const BUZZ_WORD = "Buzz";
const checkModuleIsZero = (numerator, denominator) => {
return numerator % denominator === 0;
clsource / birds-chile.json
Last active Jul 5, 2020
Birds from Chile (Aves de Chile) JSON file extracted from
View birds-chile.json
[{"data":{"id":76,"uid":"76-buteo-albigula","map":{"svg":""},"image":{"url":"","uri":"","filename":"17082018024245aguilucho_chico_tomas_rivas_web.jpg","name":"17082018024245aguilucho_chico_tomas_rivas_web","ext":"jpg"},"gallery":[{"url":"","uri":"","filename":"17082018024245aguilucho_chico_tomas_rivas_web.jpg","name":"17082018024245aguilucho_chico_tomas_rivas_web","ext":"jpg"}],"names":{"spanish":"Aguilucho Chico","latin":"Buteo albigula","english":"White-throated Hawk"},"audio":{},"info":{"name":{"name":"Nombre en Inglés","key":"name","value":"White-throated Hawk"},"dimorfism":{"name":"Dimorfismo","key":"dimorfism","value":"No"},"migration":{"name":"Migratoria","key":"migration","value":"Sí"},"size":{"name":"Longitud","key":"size","value":"38 - 48 cm."},"geo":{"n