Skip to content

Instantly share code, notes, and snippets.

View thomascrha's full-sized avatar

Thomas thomascrha

View GitHub Profile
@thomascrha
thomascrha / README.md
Last active March 21, 2025 13:02
Install Ubuntu 18.04 Macbook Air 2011

This is just some notes on what I did to get my macbook air up and running with Ubuntu 18.04

Install Ubuntu

This is actaully pretty simple - this setup does not dual boot making it easier. The only issue durring the install is not having internet as the wifi car is not supported by ubuntu out of the box. The easiest method is to utilise a USB-RJ45 adaptor to get internet during install and make sure you check the download updates and proprietary drivers.

Once booted you have a baically running version of Ubuntu.

@thomascrha
thomascrha / FreeNAS.md
Last active April 21, 2023 17:36 — forked from zenxedo/TrueNAS Setup.md
Utimate FreeNAS Setup

FreeNAS

These are my current FreeNAS plugins settings, also useful commands and backup schemes.

My current setup: Updated 19/12

Info on what is currently setup on freenas.local

@thomascrha
thomascrha / postprocessing.py
Created October 14, 2015 14:07
Proces word and sentence lists, to determine language.
#! /usr/bin/python
"""
This script will post process data from a Spider run.
It will only work on either sentences or words.
Provide the script with how many characters you want each word/sentence to be,
the file to be processed and the language code.
Once your happy with the output please inject it to an output file, shown below
./postprocessing.py -f FILE -l LANG -c CHARATER > OUTFILE.txt
@thomascrha
thomascrha / angryChild.js
Last active August 29, 2015 14:14
Angry Children - (Incomplete: memory hog)
/*Problem Statement
Given a list of N integers, your task is to select K integers from the list such that it's unfairness is minimized.
if (x1,x2,x3,,xk) are K numbers selected from the list N, the unfairness is defined as
max(x1,x2,,xk)−min(x1,x2,,xk)
where max denotes the largest integer among the elements of K, and min denotes the smallest integer among the elements of K.
Input Format
@thomascrha
thomascrha / flipBits.js
Created January 29, 2015 10:50
Flipping Bits
/*Problem Statement
You will be given a list of 32-bits unsigned integers. You are required to output the list of the unsigned integers you get by flipping bits in its binary representation (i.e. unset bits must be set, and set bits must be unset).
Input Format
The first line of the input contains the list size T. T lines follow each line having an integer from the list.
Constraints
@thomascrha
thomascrha / maxXor.js
Last active August 29, 2015 14:14
Maximizing XOR
/* Problem Statement
Given two integers: L and R,
find the maximal values of A xor B given, L A B R
Input Format
The input contains two lines, L is present in the first line.
R in the second line.