Installing CCMiner from Tpruvot on Ubuntu 17.10

http___www.bigleaguekickball.com_category_press_ buy soma cheap no prescription  

 

sudo apt-get install git libcurl4-openssl-dev libssl-dev libjansson-dev automake

 

git clone https://github.com/tpruvot/ccminer.git .

./autogen.sh

./configure

./build.sh

Test the miner

./ccminer -a cryptonight -o stratum+tcp://trtl.mine2gether.com:3335 -R 10 -u TRTLuypK6cF1ubazQeQC957FkqXjFD9mkMAwUdUbw3wsXHtHXfBZFoVXWh4FZkaPpgcd4SFqsMDqDMMHx5P34vLShReyMV3ZasY -p x

Setting up Ubuntu 17.10 with Cuda 9.1

Install Ubuntu 17.10

These are the steps for installing Cuda on a fresh Ubuntu 17.10 install. I’m running my machine without a dedicated monitor, so some of my configuration is optional.

Install Nvidia drivers

Firstly make the necessary preparations to install your chosen driver. Add the PPA repositiry for graphics drivers, then update/upgrade your system:

sudo add-apt-repository ppa:graphics-drivers/ppa   
sudo apt-get update   
sudo apt-get upgrade

Now install your chosen Nvidia driver – in my case the latest version is 3.90:

sudo apt-get install nvidia-390

You can test your install with:

nvidia-smi

Set up screen sharing

If you’re going to run your miner headless, you’ll need some means of accessing the desktop in order to manage your mining software. In the Settings Panel, go to Sharing and select Screen Sharing. Set this up so you have to type in a password (or numeric PIN) to connect – make sure you select the network the Miner will be running on once installed.

If you’re controlling your Miner from a Mac, set the following to allow VNC to connect:

gsettings set org.gnome.Vino require-encryption false

Disable power saving options

Open the Settings Panel – in Power you can set Blank screen to Never & disable Wi-Fi – Turn off Wi-FI to save power.

Allow auto login

To get auto login working, it is sometimes necessary to reconfigure the GDM custom.conf to suit your needs – type:

sudo vi /etc/gdm3/custom.conf

Then edit the lines as so – they may not be next to each other:

AutomaticLoginEnable=true
AutomaticLogin=miner
WaylandEnabled=false

Where AutomaticLogin is the account name you want to log in at boot up. Also note that the capitalisation of boolean values is all lowercase.

Install Nvidia Cuda Compiler

Go to the Cuda download page and select your required install method:

https://developer.nvidia.com/cuda-downloads

I chose:

Linux > x86_64 > Ubuntu > 17.04 > deb (network)

Download the file and follow the instructions on the Nvidia Cuda page – e.g:

sudo dpkg -i cuda-repo-ubuntu1704_9.1.85-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda

The Cuda installation can take some time, so maybe go make a nice hot drink.

Once complete, export the PATH for the Cuda Compiler:

export PATH=/usr/local/cuda-9.1/bin${PATH:+:${PATH}}

Install GCC & G++

For our purposes we require a earlier version of GCC and G++ than is shipped with Ubuntu 17.10. To fix this we will install GCC and G++ 6.

Run the following to install and set up our ye olde compilation tools:

sudo apt-get install gcc-6 g++-6
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++

Install and run Cuda sample scripts

Make a directory in your home directory – I have called mine ‘Cuda’.

From there run the sample scripts to test the install:

cuda-install-samples-9.1.sh .

Go to the directory the shell script creates. Type:

make

Once again, this step can take some time, so you might wanna go do something else for 10 minutes.

Install the Cuda toolkit

The toolkit installs some useful tools, we don’t necessarily need these, but one of the tools is useful for verifying our Cuda install:

sudo apt install nvidia-cuda-toolkit

To test your install, simply run:

nvcc -V

That’s it!

That’s all you need to do to set up Cuda for Ubuntu 17.10. We’re setting this up for the purpose of running Crypto Miners but I hope this guide will benefit anyone trying to get Cuda 9.1 running on their Ubuntu machine.

Let me know how you get on below 😀

Add a Feefo rating to your site

Feefo is a popular service that allows businesses to aggregate reviews and ratings of their services. You can then promote your fine work to the world in the form of a star rating on your site – hopefully giving your potential customers some confidence in what you’re offering.

Recently I created a generic script for displaying a Feefo rating on your site – on first load the script gets the data from Feefo and renders the data appropriately. It will then save that data in the users session storage for subsequent page loads.

The HTML

Pretty self explanatory. This is the container for the star rating and the Feefo logo:

<div class="feefo-percentage"></div>

The next bit displays the number of reviews the rating was based on – I’ve also added a link opportunity for your Feefo page if required:

<p><a href="">Read the reviews</a> (<span class="feefo-responses">0</span> reviews)</p>

I have generally added this inline but you can also incorporate this in your core JS files or add it to your feefo.js file if you only ever intend to use the script with one site:

<script type="text/javascript">

	/* Feefo setup */

	var feefoLogin = 'www.yoursite.tld';

</script>

Lastly, make a reference to your feefo.js file – this should be called last as it may block the loading of more important objects on your page if loaded in the header:

<script type="text/javascript" src="/path/to/scripts/feefo.js"></script>

The JavaScript

The main JS for the functionality can be put in a file on its own for reuse on multiple sites or templates or incorporated into your larger codebase – ensure it is placed after the script snippet above:

var FeefoData = {

	use: function(data) {

		if (sessionStorage.feefoPercentage && sessionStorage.feefoResponses) {

			feefoPercentage = sessionStorage.feefoPercentage;
			feefoResponses = sessionStorage.feefoResponses;

		} else {

			feefoPercentage = data.FEEDBACKLIST.SUMMARY.AVERAGE;
			feefoResponses = data.FEEDBACKLIST.SUMMARY.TOTALRESPONSES;
			feefoExpires = Date.now();

			sessionStorage.feefoPercentage = feefoPercentage;
			sessionStorage.feefoResponses = feefoResponses;
			sessionStorage.feefoExpires = feefoExpires + (1000 * 60 * 60 * 24);

		}

		var feefoPercentageBlocks = document.querySelectorAll('.feefo-percentage');

		for (var f = 0; f < feefoPercentageBlocks.length; f++) {

			var ghostPercentage = document.createElement('div'),
				activePercentage = document.createElement('div');

			activePercentage.style.width = feefoPercentage + '%';
			activePercentage.setAttribute('title', feefoPercentage + '% approval rating from Feefo');

			feefoPercentageBlocks[f].appendChild(ghostPercentage);
			feefoPercentageBlocks[f].appendChild(activePercentage);

		}

		var feefoResponsesBlocks = document.querySelectorAll('.feefo-responses');

		for (var t = 0; t < feefoResponsesBlocks.length; t++) {

			if ('textContent' in document.body) {
				feefoResponsesBlocks[t].textContent = feefoResponses;
			} else {
				feefoResponsesBlocks[t].innerText = feefoResponses;
			}
		}

	},

	get: function() {

		/* Has data expired? */

		if (sessionStorage.feefoExpires) {

			if (sessionStorage.feefoExpires < Date.now()) {
				sessionStorage.clear();
			}

		} else {

			sessionStorage.clear();

		}


		/* Feefo content */

		if (sessionStorage.feefoPercentage) {

			FeefoData.use();

		} else {

			var head = document.querySelector('head'),
				feefoURI = 'https://www.feefo.com/feefo/xmlfeed.jsp?logon=' + feefoLogin + '&json=true&since=year&limit=0&callback=FeefoData.use',
				scriptElement = document.createElement('script');

			scriptElement.setAttribute('src', feefoURI);
			scriptElement.setAttribute('type', 'text/javascript');
			head.appendChild(scriptElement);

		}

	}

}


/* Run initialisation */

if (window.addEventListener) {
	window.addEventListener('load', FeefoData.get);
} else {
	window.attachEvent('onload', FeefoData.get);
}

The JavaScript loads the data from the Feefo web site then stores the relevant bits into sessionStorage - I also added a timestamp so I can expire the data after a day for those who never close their browsers (so that's me then).

The CSS

Styling for the rating stars and the logo. The logo is in Base64 format and inlined in the CSS below - the stars are in SVG format and have been urlencoded before being inlined:

.feefo-percentage {
	position:relative;
	width:85px;
	height:17px;
}

.feefo-percentage:after {
	content:'';
	background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAvCAMAAACRx3WWAAABFFBMVEUAAABJRUVJRUVJRUVJRUX/3QBJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUWHeTL/3QBJRUVJRUVJRUVJRUVJRUVJRUVJRUX/3QBJRUVJRUX/3QBJRUVJRUX/3QD/3QD/3QD/3QD/3QD/3QBJRUVJRUX/3QD/3QD/3QD/3QBJRUVJRUX/3QD/3QBJRUX/3QBJRUX/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QD/3QBJRUVJRUX/3QBcKUrgAAAAWnRSTlMAB+B6dj4L5e9arhrzzBYz2ZCEf7yYQyMQ/PXpn2fVi28sBOzCqqWITzgfglT5lGE9Nvjc0xnh27RaS59QSSgeC9G2LyUU5cGueGBB8MrIK82NcmdEqW5UEV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y41j+j4a1s4ZPYFXJKbdLCIWGeNEsuyTpdTowzEBoEo7mJy0+S/WRZFcXpaSTvJCOv5s91KHi1PZPby0y9sXLueOW5NzgPPJVuOnxwSkIklFMfzdsdlNVksakjOiyEiItdzdxk1nY74ze5rtLE7nkcsb1t67dy/9194E5CIpVWd6wLQtBtnFlqrerYgibUXXW0FCFmyOZxbls/PlP+wxY9vnIBfxFcmPlVobDG2dFHkGs4l6m53UKhGRpigSc2RMiq/giCQ2h3f2ls+2J8Bx/uXWbkyetq4BFCKnuJoMfQtqikFexCDfOzTAQUt6nc/fHh0/XoOUm8nR8br9yBUiY1xNGRK4mlNepKbsqctcDHCPWuQEV5OEjptz40V6KDwsoUooeSaSwdXEXZ3IgBcx/6uIiatpQwBXE+ZF6PO7ACdVz68WG1jVpGCAqwnwIjmNxL2I6s9fa56JwD4thNfkdLpwRRN7VTErYQrh90LyvVy9M/BOhIbCMSipF2ltrkQQSdOKPqjoNPveiYyYgl1Nmz5P9yIDec88YEsU70RyBenLCxIidWeUHshnSUR8UaZnJrXmiA3sHopAGqkJuQGJEEH3wRy/pNiPbJBJWpwX4dv4UPmnyriFDBEvRSJI8XcyWSNiBjb5vyw44pYe6PWN/rijIaUmiAghUUu1N2JcgvJSBJLIktfIhXCUF7qzS9UKXPKXicDailbXWxHQUUAstPu4hH3xsbtYugsei0SiqKTMBhu1rSiyeukkeC0C5hAVVByFhYoTUImAqawc0uC9CJiaqlwEFyYDUItAT1Nvkfci0G+iyHAETrpFFIn1QCWiXjo6gr9mJL+kAWHnDmrAY5SQI18JAhXRpP/1liwgRysLf094GLUZBoAlkmCzR7E0BhlmusieRsfxRcFYwV66EHNE1n7H71i6B14QzEZssjngGAdKKf1Cb7YSJzlQkTtJtJoXF3qqFBjXwUmkby/d51O2L5No6bH9/YuDSteAv+cHJuifmXrVL8kAAAAASUVORK5CYII=');
	width: 82px;
	height: 19px;
	display: block;
	position: absolute;
	top: -4px;
	right: -92px;
	background-size: 82px 19px;
}

.feefo-percentage > div {
	background-image:url('data:image/svg+xml,%3Csvg%20width%3D%22149%22%20height%3D%2229%22%20viewBox%3D%220%200%20149%2029%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%0A%09%3Csymbol%20id%3D%22sym%22%20viewBox%3D%220%200%2029%2029%22%3E%0A%09%09%3Cpath%20fill%3D%22%23fddf05%22%20d%3D%22m0%2C11.11l10.94%2C0l3.38%2C-11.11l3.38%2C11.11l10.94%2C0l-8.85%2C6.86l3.381%2C11.11l-8.85%2C-6.86l-8.85%2C6.86l3.38%2C-11.11l-8.85%2C-6.86l-0%2C0z%22%2F%3E%0A%09%3C%2Fsymbol%3E%0A%0A%09%3Cg%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%2230%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%2260%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%2290%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%22120%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%3C%2Fg%3E%0A%0A%3C%2Fsvg%3E');
	background-repeat:no-repeat;
	position:absolute;
	top:0;
	width:0%;
	height:17px;
	background-size:85px;
	transition:all 2s ease-in-out 1s;
}

.feefo-percentage > div:first-child {
	background-image:url('data:image/svg+xml,%3Csvg%20width%3D%22149%22%20height%3D%2229%22%20viewBox%3D%220%200%20149%2029%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%0A%09%3Csymbol%20id%3D%22sym%22%20viewBox%3D%220%200%2029%2029%22%3E%0A%09%09%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m0%2C11.11l10.94%2C0l3.38%2C-11.11l3.38%2C11.11l10.94%2C0l-8.85%2C6.86l3.381%2C11.11l-8.85%2C-6.86l-8.85%2C6.86l3.38%2C-11.11l-8.85%2C-6.86l-0%2C0z%22%2F%3E%0A%09%3C%2Fsymbol%3E%0A%0A%09%3Cg%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%2230%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%2260%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%2290%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%09%3Cuse%20xlink%3Ahref%3D%22%23sym%22%20x%3D%22120%22%20y%3D%220%22%20width%3D%2229%22%2F%3E%0A%09%3C%2Fg%3E%0A%0A%3C%2Fsvg%3E');
	width:100%;
}

.feefo-percentage > div:last-child {
	width:0;
}

This script and the related other code should work in IE9 and above, plus all other modern browsers. If you want IE8 support, all you will need to do is replace the SVG backgrounds with something less exotic to the browser, like PNGs, as below:

.feefo-percentage:after {
	background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFIAAAATCAMAAAA09qpgAAABF1BMVEUAAABJRUVJRUVJRUX/3QBHQ0WhjypJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUX/3QBJRUVJRUVJRUVJRUVJRUVIREVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVJRUVGQ0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enypK00MxOuOoYjZNdOkuJ7imKx4BdAhfw25LGLTvtVOjTqx20fK5QEaVvsPQMk/J0bLKn9Frlj3bj9hrARj6MQaQDy3R8GPK2Epu/awnUdHVFohfPFgvevR6PE4grth2lLpRV1iZ9apa1YY9hHglW1Vto01acnTdkUi1jUI6bZf+Yysv5XnbfvS0KhoAAAAASUVORK5CYII=');
}

.feefo-percentage > div {
	height:16px;
	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAQCAMAAAC2lwjzAAAAJFBMVEUAAAD93wX93wX93wX93wX93wX93wX93wX93wX93wX93wX93wUfG+E4AAAADHRSTlMAw7EMLZJ4SVve9P8upb9vAAABC0lEQVQ4y7XT227DIAyA4R9s1rTv/6ydijnsAmghqdqt0rhJvshxDHagLRGW9bH9vyW0XYC9TmB76whsFw1a6vx+CDu71WdXy5zwMuxHoU6XgiDMDkf72Sf3yNQqBpsrNojzVm9wm7cUR3y3Pbxl7xwXCMk7hw9lta4+1frSm5N6nkqPBf/1B3+7HFZrJt8bVrNBlp29uPHg4AK2WiDV2A78Wg2OzneX+N4ClK21pqT2nWHXz7mcntvHbtWHfe/ZPOTkHjhcnjuz/h1x3MsG1+t9ZECb9beW5k36GIkSM8gYdg0fmtwqLDUZWMaNHa12ZANLB5fV1VqFoql312dYTAXEp97NvYUKoLN/AHmxwMyCHcygAAAAAElFTkSuQmCC);
}

.feefo-percentage > div:first-child {
	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAQCAMAAAC2lwjzAAAAHlBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMwLbf+mAAAACnRSTlMAvAstfplLYd3/31pszwAAAPdJREFUOMul09GugyAQRdE9DPb6/19LHBn6ACpgrmlaX8gy5IAHhPqEwPB87XNcfgtc5sC4jRNinhxH58lbHANV1mHJcLOMXkWHwNNtmsCw5ALLk+M0/wUyBGawvpsNtifb4RZQoHUkfxvACiSAoPboJfujXxK03/ue+clJont3A7LBzV39s312KQLoUgtNofagvn7lYhkUKFoDvfVaXnWPsn9o1RZ4HJKfd4fjzLrhbp8s3esABIWUupvVrP853l0SxNACRbBSdo529e79bhucitUdBcDJO5hfl705nDawfNkN9nz9Zs1WPz+E0k6rttzZ/QMTe78BYwWeB9fsKxAAAAAASUVORK5CYII=);
}

Put all that in your IE8 CSS file and you should be done.

Setting up Ubuntu Server 14.04 LTS

Install

This guide is primarily for my own reference; I run a basic server at home for Git repositories and test sites.

My preference is to run the Long Term Support version of Ubuntu Server. For my new machine I’ll be running 14.04 LTS which will have 5 years of support, so until 2019.

Basically I want to set it up and forget about it – what I don’t want to forget is how it’s set up.


Network

First things first – because this is a server and will primarily be accessed by applications and via SSH/sFTP, let’s make a few networking changes.

Static IP address

To make life easier I want the server to have a static IP address that is easy to remember – I have chosen 192.168.1.150

This number is based on my Plusnet routers addressing of 192.168.1.254

iface eth0 inet static
                address  192.168.1.150
                netmask  255.255.255.0
                gateway  192.168.1.254
                dns-nameservers  8.8.8.8  8.8.4.4

The snippet above is placed in your interfaces configuration:

sudo vi /etc/network/interfaces

This was based on the information from the Unixmen page:

To restart your interface use:

sudo ifdown eth0 && sudo ifup eth0

Your new IP address should be active. If not then you can also try rebooting the machine.

sudo reboot

SSH

From another machine you can log in to your server using OpenSSH as installed during the Ubuntu installation.

Log in

From Terminal:

ssh username@192.168.1.150

Type in your password when it prompts you and agree to any other messages.

Passwordless entry

Generate your key on a client machine, in my case a Mac Pro, though this is pretty much the same as most Linux distributions:

ssh-keygen -t rsa -b 4096

Follow the key generation instructions until you are returned to the command prompt.

To transfer the key to the servers authorised hosts file use the command below:

cat ~/.ssh/id_rsa.pub | ssh username@192.168.1.150 "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"

This key can now also be used in applications such as Filezilla and Tower 2 as well.

Now that we have access to our server remotely and it can use passwordless entry, we can disable password access in the SSH config file:

sudo vi /etc/ssh/sshd_config

Change the value of the line below to:

PasswordAuthentication no

To apply the new configuration, restart the SSH server:

sudo service ssh restart

Logging more detail

To log more detail about what SSH is doing, change the value of the line below to:

LogLevel VERBOSE

To apply the new configuration, restart the SSH server:

sudo service ssh restart

To view the log use:

sudo vi /var/log/auth.log

 

Commands useful with SSH

Turn the machine off – shutting down and power off:

sudo shutdown -h now

Reboot the machine – shutting down and restart:

sudo reboot

Determine where you are in the file structure:

pwd

Clear the terminal window:

clear

LAMP

 


Git

Open Terminal and run the following command:

sudo apt-get install git-core

You’ll need to create a Git configuration file in your home directory – I’ll use vi, because it’s just so user friendly:

sudo vi ~/.gitconfig

You should now be starting from a fresh/empty file, close vi and run the following commands to add details to your configuration file:

git config --global user.name "gitUserName"
git config --global user.email user.email@domain.co.uk

If you use GitHub use the same details you use to access the web site. Git is now installed and your user details should be saved in the configuration file.

Get the latest updates

Adding the latest version of Git from their package repository – useful on Ubuntu LTS versions where the Ubuntu Universe version is older than the Git version:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get upgrade

Mirror existing repositories

Mirroring your existing repositories to the new server

Shooting the Seventy Plus

While it is far from finished, I’ve just started making some good progress on a small web site for a photography project being run by local family photographer Lindsay Wakelin.

The site is to display the portraits of those who are now over 70 years old, with a view to having them seen in a different light and not just ‘that old guy in your way’.

dad

If you live in the Colchester area (or are happy to travel) then contact Lindsay and she can talk you through what she’s doing – it’s free and she’ll even provide you with a high-quality digital portrait you can get printed, send to friends and family via email or just use on your Facebook account.

Your portrait will also be listed on the seventy plus web site and posted on Twitter.com/seventypluscouk

Google AdWords: Ad Rotation

If you are just starting a new campaign with multiple untested ads, set the option under ‘Ad delivery: Ad rotation, frequency capping’ in Settings to ‘Rotate evenly: Show ads more evenly for at least 90 days, then optimise’.

Screen Shot 2014-06-05 at 14.39.34

This should evenly display your ads before applying what’s learnt to the campaign. I’d hope this would stop short term weird behaviour dictating how a whole campaign will be run.

For instance, I started a Product Photography campaign a few days ago. It has about 10 ads running with some explicit to a particular industry and some quite broad:Screen Shot 2014-06-05 at 14.29.58

I would have expected the broad Product photography ad to have been more applicable in more places, but I’m guessing at some point someone clicked on the Industrial photography ad and as a result Google has decided that the ad should be shown more often.

 

Fuzzy time

I really like fuzzy time, it pains me that my phone is so accurate about time. When I got my Pebble Steel the first thing I did was seek out a fuzzy time watchface.

IMG_8637-2

Or in other words, make it less accurate.

Actually I was a little disappointed that a great fuzzy time watchface already existed as I had vowed to create one if it hadn’t. To compensate I wrote a web site that displays fuzzy time instead.

Where I can’t implement actually fuzzy time I settle for just incorrect time – both the clocks in my car are wrong. For half the year one of them is 10 minutes fast and the other 1 hour and 10. The rest of the year one is still 10 mins fast but the other 50 mins slow – needless to say I never get where I’m going on time! Annoyingly the mechanic who services my car insists on putting the cars clock right…

Greenwich Half Time

A concept I like, that is of my own invention, is Greenwich Half Time. To take a point between normal time and day light saving and just settle on it. Admittedly we’d be half hour off everyone else but at least we’d never have to put the clocks forward/back again.

Connect Ubuntu to a Samsung M2022w printer

Setting up your Samsung M2022w wireless printer can be a pain if you don’t know where to look – luckily someone has taken that pain upon themselves so you don’t have to.

The Samsung Unified Linux Driver Repository is the place to get your Samsung driver for Ubuntu (or Linux in general).

Start by adding the repository – in Ubuntu Terminal:

sudo wget -O - http://www.bchemnet.com/suldr/suldr.gpg | sudo apt-key add -

Then refresh your updates cache:

sudo apt-get update

Install the driver:

sudo apt-get install suld-driver2-1.00.06

Setting up the printer

With the driver installed you can now set up the printer – find the Printers applet, click ‘Add’.

printer-setup-1

Open ‘Network Printer’, after a short while a whole bunch of options will appear like below. Click on the option titled ‘Samsung M2022 Ser…’ and then ‘Forward’.

printer-setup-2

Some screens will pass that are very self explanatory, you really can’t go wrong. The last screen allows you the option to do a test print, feel free.

printer-setup-3

Click ‘OK’.

Replicating a mySQL database

The database

If you’re running a site that uses mySQL then you’ll need to export the data into a text file (.sql) somewhere on the file system.

If you don’t have root or sudo access then choose somewhere in your home folder:

cd ~/

Then run the following command replacing user_name with your mySQL username,database_name with the name of the database you want to export and filename

Continue reading “Replicating a mySQL database”