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
var os = require("os"); | |
//Create function to get CPU information | |
function cpuAverage() { | |
//Initialise sum of idle and time of cores and fetch CPU info | |
var totalIdle = 0, totalTick = 0; | |
var cpus = os.cpus(); | |
//Loop through CPU cores |
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
loadkeys uk | |
wifi-menu | |
lsblk | |
cgdisk /dev/sda #100M EF01 boot | |
cryptsetup -y -v luksFormat /dev/sdaX | |
cryptsetup open /dev/sdaX cryptroot | |
mkfs -t ext4 /dev/mapper/cryptroot | |
mount -t ext4 /dev/mapper/cryptroot /mnt | |
mkfs -t ext4 /dev/sdaY | |
mkdir /mnt/boot |
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
import java.util.ArrayList; | |
public class Reversible implements IReversible { | |
public ArrayList<Integer> listReversible(int upperLimit) { | |
ArrayList<Integer> list = new ArrayList(); | |
for(int i = 0; i < upperLimit; i++) { |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
void end() { | |
printf("Game over.\n"); | |
exit(0); | |
} |
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
var crypto = require('crypto'); | |
var http = require('http'); | |
var JUICER_API_KEY = "YB0MY3VMHyllzPqEf5alVj5bUvGpvDVi"; | |
var urls = [ | |
'http://www.bbc.co.uk/news/science-environment-31965456', | |
'http://news.sky.com/story/1448732/north-korea-defectors-are-human-scum', | |
'http://www.independent.co.uk/news/world/asia/north-korea-ready-anytime-for-nuclear-war-as-diplomat-calls-defectors-animals-and-scum-10121587.html', | |
'http://www.theguardian.com/education/2015/mar/20/labour-calls-time-on-exam-factory-approach-to-schooling', | |
'http://www.ft.com/cms/s/eb98baa4-ce49-11e4-86fc-00144feab7de,Authorised=false.html?_i_location=http%3A%2F%2Fwww.ft.com%2Fcms%2Fs%2F0%2Feb98baa4-ce49-11e4-86fc-00144feab7de.html%3Fsiteedition%3Duk&siteedition=uk&_i_referer=http%3A%2F%2Fwww.ft.com%2Fhome%2Fuk#axzz3Uv0Y2KoV', | |
'http://www.telegraph.co.uk/finance/economics/11484544/Europe-squeezes-more-reforms-from-Greece-as-Merkel-steps-into-bail-out-talks.html', |
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
package cs21120.assignment2.solution; | |
import cs21120.assignment2.FloatImage; | |
import cs21120.assignment2.ISnapper; | |
import java.util.concurrent.PriorityBlockingQueue; | |
import java.util.LinkedList; | |
import java.awt.Point; | |
/** |
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
\documentclass[10pt]{article} | |
\usepackage{a4wide} | |
\usepackage[english]{babel} | |
\usepackage{fancyhdr} | |
\usepackage{hyperref} | |
\usepackage{lastpage} | |
\usepackage{graphicx} | |
\usepackage[section]{placeins} | |
\usepackage[superscript,biblabel]{cite} | |
\usepackage[margin=1in]{geometry} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Owen Garland</title> | |
<link rel="icon" type="image/x-icon" href="favicon.ico" /> | |
<style> | |
.pdf { | |
width: 100%; | |
height: 100%; |
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
# /etc/wpa_supplicant/eduroam.conf | |
ctrl_interface=/var/run/wpa_supplicant | |
ctrl_interface_group=root | |
network={ | |
ssid="eduroam" | |
scan_ssid=1 | |
key_mgmt=WPA-EAP | |
eap=TTLS | |
identity="[email protected]" |
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
def quicksort(arr): | |
if not arr: | |
return [] | |
pivot = arr[-1] | |
less = [x for x in arr[:-1] if x <= pivot] | |
more = [x for x in arr[:-1] if x > pivot] | |
lesser = quicksort(less) | |
greater = quicksort(more) |
OlderNewer