Skip to content

Instantly share code, notes, and snippets.

View james-s-tayler's full-sized avatar

James Tayler james-s-tayler

View GitHub Profile
@james-s-tayler
james-s-tayler / maven-333.sh
Last active January 23, 2016 16:03 — forked from ervinb/maven-333.sh
Install Maven 3.3.3 on Ubuntu 14.04
#!/bin/sh
sudo apt-get purge -y maven
curl -OL http://mirror.olnevhost.net/pub/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
sudo tar -zxf apache-maven-3.3.3-bin.tar.gz -C /usr/local/
sudo ln -s /usr/local/apache-maven-3.3.3/bin/mvn /usr/bin/mvn
sudo echo "export M2_HOME=/usr/local/apache-maven-3.3.3" >> ~/.profile
. ~/.profile
sudo echo "Maven is on version `mvn -v`"
@james-s-tayler
james-s-tayler / install-java-8-on-ubuntu-14.04-auto-accept-licence-agreement.sh
Last active November 13, 2018 08:37
Install oracle Java 8 on Ubuntu 14.04 and automatically accept the licence agreement. 100% hands-free install.
#! /bin/bash
sudo apt-get update
sudo apt-get install -y software-properties-common debconf-utils
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-installer
echo 'gsettings set org.gnome.desktop.background picture-options "centered"' >> /home/vagrant/.profile
echo 'gsettings set org.gnome.desktop.background primary-color "#222222"' >> /home/vagrant/.profile
sudo apt-get install -y gnome-session-fallback
echo user-session=gnome-fallback >> /etc/lightdm/lightdm.conf
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/home/vagrant/eclipse/eclipse
Terminal=false
Icon=/home/vagrant/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install -y google-chrome-stable
wget http://mirror.internode.on.net/pub/eclipse/technology/epp/downloads/release/mars/R/eclipse-java-mars-R-linux-gtk-x86_64.tar.gz
tar xvfz eclipse-java-mars-R-linux-gtk-x86_64.tar.gz -C /home/vagrant
sudo ln -s /home/vagrant/eclipse /usr/bin/eclipse
wget -qO- https://goo.gl/j72ZWd > /usr/share/applications/eclipse.desktop
echo 'alias eclipse="$HOME/eclipse/eclipse &"' >> /home/vagrant/.bashrc
wget https://github.com/seeq12/eclipse-import-projects-plugin/archive/v1.3.0.tar.gz
tar xvfz v1.3.0.tar.gz -C /home/vagrant
cp /home/vagrant/eclipse-import-projects-plugin-1.3.0/jar/com.seeq.eclipse.importprojects_1.3.0.jar /home/vagrant/eclipse/plugins
@james-s-tayler
james-s-tayler / dynadot.js
Created May 3, 2016 01:50
dynadot available domain name bookmarklet
javascript:(function(){$(".table-responsive").find("table tr:contains('Taken')").hide();$(".table-responsive").find("tr").find('td:nth-child(2)').nextAll().hide();$(".table-responsive").find("tr").find('td:nth-child(2)').prevAll().hide();})();
@james-s-tayler
james-s-tayler / un-sumome.js
Created May 4, 2016 01:13
un-sumome - javascript bookmarklet to hide sumome social sidebar.
javascript:(function(){var v = "1.3.2";
if (window.jQuery === undefined || window.jQuery.fn.jquery < v) {
var done = false;
var script = document.createElement("script");
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js";
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
done = true;
initMyBookmarklet();
}
$('.biz-listing-large').each(function(index, listItem) {
var shopName = $(listItem).find('.biz-name').text().trim();
var address = $(listItem).find('address').text().trim().replace(/Auckland/g,", Auckland");
console.log(shopName + "," + address);
});