Skip to content

Instantly share code, notes, and snippets.

@JamesDaniel
JamesDaniel / p4merge install
Last active November 8, 2017 17:19 — forked from AaronGhent/p4merge install
Installs p4merge on a linux based machine
wget http://www.perforce.com/downloads/perforce/r15.2/bin.linux26x86_64/p4v.tgz
tar zxvf p4v.tgz
sudo cp -r p4v-* /usr/local/p4v/
sudo ln -s /usr/local/p4v/bin/p4merge /usr/local/bin/p4merge
@JamesDaniel
JamesDaniel / virtualbox_install.sh
Created October 6, 2017 08:43
install virtual box
# Instructions on how to install virtual
# Confirmed this works on Linux Mint 18.1 Serena 64bit. Desktop environment Cinnamon. Ubuntu codename xenial.
# First uninstall any current versions of virtual box
sudo apt autoremove --purge virtualbox*
## check if removal was successful
dpkg -l virtualbox* | grep ^i
## if not successful uninstall/purge by name listed
sudo dpkg --purge virtualbox=5.0.40-dfsg-0ubuntu1.16.04.1
// For spring-boot projects.
ClassLoader classLoader = getClass().getClassLoader();
File file = new File(classLoader.getResource("csv/predefined_countries.csv").getFile());
@JamesDaniel
JamesDaniel / app.groovy
Last active June 24, 2017 21:30
spring-boot-groovy
@RestController
class ThisWillActuallyRun {
@RequestMapping("/")
String home() {
return "Hello World!"
}
}
@RestController
tcpdump port 443 and '(tcp-syn|tcp-ack)!=0'

How to install mysql on ubuntu (which works)

first delete it in case a root password was previously created:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean

then install it:

@JamesDaniel
JamesDaniel / ubuntu_commands.sh
Created January 14, 2017 14:24
usefull ubuntu commands used before
# if failure to detect wifi network in desktop.
sudo service network-manager restart
@JamesDaniel
JamesDaniel / os_setup.md
Last active January 15, 2017 00:24
OS setup commands

Boot to terminal

Raspberry Pi 3

sudo raspi-config

ubuntu 16

Stops the ubuntu purple screen

@JamesDaniel
JamesDaniel / file.rb
Last active January 10, 2017 19:07
node REST end point with ID
app.get('/user/:uid/files/*', function(req, res){
var uid = req.params.uid,
path = req.params[0] ? req.params[0] : 'index.html';
res.sendfile(path, {root: './public'});
});
mint 18 installations
Installation steps taken for this VM:
Install Curl:
sudo apt-get install curl
Install nodejs:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
Install build tools for npm:
sudo apt-get install -y build-essential