Skip to content

Instantly share code, notes, and snippets.

James JamesDaniel

Block or report user

Report or block JamesDaniel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JamesDaniel
JamesDaniel / p4merge install
Last active Nov 8, 2017 — forked from AaronGhent/p4merge install
Installs p4merge on a linux based machine
View p4merge install
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
View virtualbox_install.sh
# 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
View load_from_resources.java
// 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 Jun 24, 2017
spring-boot-groovy
View app.groovy
@RestController
class ThisWillActuallyRun {
@RequestMapping("/")
String home() {
return "Hello World!"
}
}
@RestController
View install_mysql.md

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 Jan 14, 2017
usefull ubuntu commands used before
View ubuntu_commands.sh
# if failure to detect wifi network in desktop.
sudo service network-manager restart
@JamesDaniel
JamesDaniel / os_setup.md
Last active Jan 15, 2017
OS setup commands
View os_setup.md

Boot to terminal

Raspberry Pi 3

sudo raspi-config

ubuntu 16

Stops the ubuntu purple screen

@JamesDaniel
JamesDaniel / file.rb
Last active Jan 10, 2017
node REST end point with ID
View file.rb
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'});
});
View gist:39229859d5c3d6e0086ec6a5159d9862
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
You can’t perform that action at this time.