This file contains 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
#! /bin/sh | |
LED_CONTROL_CMD="switch_led" | |
LED_CONTROL_CMD="echo" | |
BASE_LED_NUMBER="5" | |
INTERVAL="30" | |
HOSTS=" | |
google.com | |
slashdot.org |
This file contains 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
#! /usr/bin/runhaskell | |
-- | |
-- FutureLearn Haskell Course Sep-Oct 2016 | |
-- Lessons 4.6: Parsing Text Using Higher-Order Functions | |
-- Section: Expression parsers | |
-- | |
module Main where | |
import Text.Printf |
This file contains 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
#! /usr/bin/runhaskell | |
-- | |
-- NAME | |
-- hyper_exponential.hs | |
-- | |
-- DESCRIPTION | |
-- Calculates terms of the HyperExponential sequence: | |
-- 1 | |
-- 2^2 | |
-- (3^3)^3 |
This file contains 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
#! /bin/env escript | |
% NAME | |
% fib.erl -- Erlang exercise with Fibonacci numbers | |
% | |
% SYNOPSIS | |
% fib {from-integer} [{to-integer}] | |
% | |
% INSTALL | |
% ln -s fib.erl fib |
This file contains 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
#! /bin/env escript | |
% NAME | |
% fib_multi.erl -- Multiple algorithms for Fibonacci numbers | |
% | |
% SYNOPSIS | |
% fib_multi {from-integer} [{to-integer}] | |
% | |
% INSTALL | |
% ln -s fib_multi.erl fib_multi |
This file contains 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
#! /bin/env escript | |
% NAME | |
% shabits.erl -- "FP in Erlang" course, lesson 01.24 assignment | |
% | |
% SYNOPSIS | |
% shabits {triangle-side-A} {triangle-side-B} {triangle-side-C} | |
% | |
% INSTALL | |
% ln -s shabits.erl shabits |
This file contains 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
#! /bin/env escript | |
%% Simplest use of Erlang's escript and commandline arguments | |
%% for an interface to the tail-recursive factorial function. | |
-module(fact). | |
fact(N) -> | |
fact(N, 1). |
This file contains 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
#! /bin/env nickle | |
# | |
# NAME | |
# hyper_exponential.nickle | |
# | |
# DESCRIPTION | |
# Calculates the sequence: | |
# 1 | |
# 2^2 | |
# (3^3)^3 |
This file contains 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
/* | |
* Simple gist to illustrate how C bitfields work. | |
*/ | |
#include <stdio.h> | |
struct { | |
unsigned char bit0 : 1; | |
unsigned char bit1 : 1; | |
unsigned char bit2 : 1; | |
unsigned char bit3 : 1; |