# Crystal program
puts "What's your name?"
print "-> "
name = gets.to_s.chomp
puts "Your name is #{name.capitalize}"
puts "-------------" + ("-" * name.size)
# A very basic HTTP server
View Walk.js
import fs from 'fs';
const Walk = (dir, originalDir = false) => {
let results = new Array();
if (!originalDir)
originalDir = dir;
fs.readdirSync(dir).forEach(file => {
const fullFile = `${dir}/${file}`;
View Example1Chapter2
import java.util.Scanner;
public class Example1Chapter2
public static void main(String[] args)
Scanner scanner = new Scanner(;
View 1.RegistrySnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<registrySnapshot xmlns:xsd="" xmlns:xsi="">
<key installerType="Unknown" displayName="Nightly 53.0a1 (x64 en-US)" displayVersion="53.0a1">
<KeyPath>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Nightly 53.0a1 (x64 en-US)</KeyPath>
<DefaultValue />
<InstallLocation><![CDATA[C:\Program Files\Nightly]]></InstallLocation>
<UninstallString><![CDATA["C:\Program Files\Nightly\uninstall\helper.exe"]]></UninstallString>
while read line; do
read -ra cols <<< "$line"
((sum += ${cols[4]}))
done < <(ls -la | tail -n +2 )
echo $sum
View image.png
View NeopixelRingClock.ino
#include <Adafruit_NeoPixel.h>
#include <ESP8266WiFi.h>
#include "TimeClient.h"
#define PIN D5
long lastUpdate = millis();
long lastSecond = millis();
String hours, minutes, seconds;
int currentSecond, currentMinute, currentHour;
View axidraw-manual-control.js
This requires nodejs to run
npm install terminal-kit
npm install superagent
node axidraw-manual-control.js
View app.module.ts
import { NgModule } from '@angular/core';
import { RouterModule, PreloadAllModules } from '@angular/router';
import {ActivateGuard} from './guard';
import { ROUTES } from './app.routes';
import { HomeComponent } from './home';
import { NoContentComponent } from './no-content
// Application wide providers
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console