Skip to content

Instantly share code, notes, and snippets.

View Witiko's full-sized avatar

Vít Starý Novotný Witiko

  • Brno, Czech Republic
View GitHub Profile
@Witiko
Witiko / Math.js
Last active December 22, 2015 10:58
An extension to the standard Math.* javascript library
(function(NaN, Array, Math, Number, undefined) {
var funcPointer = {
log: Math.log,
pow: Math.pow,
rng: Math.random
},
isNumber = Number.isNumber,
isFloat = function(n) {
return /\./.test(n);
@Witiko
Witiko / DOM.js
Last active December 22, 2015 10:58
An unfinished DOM interfacing library employing an API similar to that of the jQuery library.
/*
DOM(String Query[, DOM Node / Window Context])
DOM(Wrappable1[, Wrappable2[, Wrappable3[, ... WrappableN]]]) -> DOM Object Wrapper
DOM.searchEngine([Function searchEngine]) -> Sets / Resets the search function
DOM.plugins = {};
new DOM[.Prototype].Fragment([Wrapped Node(s) / Node[, Wrapped Node(s) / Node ...]])
new DOM[.Prototype].Element(String Element1Name[, String Element2Name[, String ElementNName]])
#!/bin/sh
# Time zones
sudo dpkg-reconfigure tzdata
sudo apt-get update
yes | sudo apt-get upgrade
yes | sudo apt-get install console-data locales
# Locales
sudo dpkg-reconfigure locales
# Bloatware away!
yes | sudo apt-get purge x11-common midori lxde python3 python3-minimal
#!/bin/sh
# Raspi FW update tool
sudo apt-get install git-core binutils ca-certificates
sudo wget http://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
# Clean-up
sudo apt-get purge git-core binutils ca-certificates
sudo rm -rf /usr/bin/rpi-update /root/.rpi-firmware
# Ta-da!
# include <stdio.h>
# include <stdlib.h>
# include <time.h>
void color() {
printf("\033[38;5;%dm", 17 + 6 * (rand() % 35) + rand() % 4);
}
int main() {
int input; srand(time(NULL)); color();