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/bash | |
echo "Normal" | |
echo "\033[1mBold\033[22m" | |
echo "\033[3mItalic\033[23m" | |
echo "\033[3;1mBold Italic\033[0m" | |
echo "\033[4mUnderline\033[24m" | |
echo "== === !== >= <= =>" | |
echo "契 勒 鈴 " |
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
// the setup function runs once when you press reset or power the board | |
byte counter1 = 0; // we need to define the variable counter1 | |
void setup() | |
{ | |
// initialize Port C pins 0-5 as outputs. | |
DDRC = 0b00111111; // the prefix “0b” qualifies the number as binary | |
PORTC = 0; // so all the LEDs are off initially | |
} |
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
// the setup function runs once when you press reset or power the board | |
void setup() | |
{ | |
Serial.begin(9600); | |
Serial.println(); | |
Serial.println("Line sensor test programme"); | |
} | |
// the loop function runs over and over again forever |
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/bash | |
# I need to source conda | |
source ~/anaconda3/bin/activate base | |
# Find the interesting output in stderr | |
mycmd='jupyter notebook --no-browser' | |
exec 3< <($mycmd 2>&1) | |
a=$(grep -o -m1 'http://localhost.*' <&3) | |
echo $a |
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 random | |
teams = ["alpha","bravo","charlie","delta","echo", | |
"foxtrot","golf","hotel","india","juliet", | |
"kilo","lima","mike","november","oscar"] | |
random.shuffle(teams) | |
print(teams) |
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
brew tap dart-lang/dart | |
Warning: Already tapped! | |
➜ ~ brew install dart --with-content-shell --with-dartium | |
==> Upgrading dart-lang/dart/dartium | |
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/rele | |
######################################################################## 100.0% | |
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/rele | |
######################################################################## 100.0% | |
==> Caveats | |
DEPRECATED |
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
GB_NAME="Submission of Lab Work Portfolio" | |
mmv -r $GB_NAME'_*_attempt_*.*' '#1.#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
EG-252 Git Exercise | |
=================== | |
An assessed exercise which demonstrates that you have achieved basic competence in using Git for version control. | |
See Lab 4 on Blackboard for the accompanying instructions. | |
<<<<<<< HEAD | |
**This work was submitted for assessment by name (number) on date** | |
======= | |
**This work was submitted for assessment by Omar Khalil (713626) on 18th Nov 2014** |
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 | |
# Remove old images from Ubuntu and clean up /boot and grub. | |
# | |
# Original Source: [Ubuntu Cleanup: How to Remove All Unused Linux Kernel Headers, Images and Modules](http://ubuntugenius.wordpress.com/2011/01/08/ubuntu-cleanup-how-to-remove-all-unused-linux-kernel-headers-images-and-modules/) | |
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge |
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
# Build Notes | |
If builds of PostgreSQL 9 are failing and you have version 8.x installed, | |
you may need to remove the previous version first. See: | |
https://github.com/mxcl/homebrew/issues/issue/2510 | |
To build plpython against a specific Python, set PYTHON prior to brewing: | |
PYTHON=/usr/local/bin/python brew install postgresql | |
See: | |
http://www.postgresql.org/docs/9.2/static/install-procedure.html |
NewerOlder