Transmission on Ubuntu

Standard

Transmission is a free BitTorrent client with a really simple interface, Ubuntu comes bundled with Transmission in the official build, Transmission is set as the default BitTorrent client for Ubuntu. However the version of Transmission bundled with Ubuntu is not always latest depending on the Ubuntu distribution version, we can get the latest stable version of Transmission using the official transmissionbt ppa, This PPA will download the latest stable version Transmission depending on the Ubuntu version you are using.

Adding the official ppa to the local repository database.

“`
sudo add-apt-repository ppa:transmissionbt/ppa
“`

Update your local repository database.

“`
sudo apt-get update
“`

Updating Transmission.

“`
sudo apt-get upgrade
“`

If you have removed Transmission and want to reinstall it or if you have installed an Ubuntu based distribution that does not come bundled with Transmission.

“`
sudo apt-get install transmission-gtk
“`

**Done!**

Sass on Raspberry Pi

Standard

Sass also is known as Syntactically Awesome Stylesheets is a stylesheet scripting language that is interpreted into Cascading Style Sheet also known as CSS. Sass consists of two syntaxes, The original syntax, called “the indented syntax”, uses a syntax similar to Haml, It uses indentation to separate code blocks and newline characters to separate rules, it uses a .sass extension, The newer syntax uses block formatting that is similar to CSS, It uses braces to denote code blocks and semicolons to separate lines within a block, the new syntax uses a .scss extension.

Sass is really useful when you have to write a lot of stylesheet for a large project or when you want to write maintainable stylesheet library. Sass offers the following features variables, nesting, and mixin.

Raspberry Pi can be a really good dedicated hardware to build and manage Sass based projects.

Installing Sass on your Raspberry Pi is really simple.

Installing Ruby.

(Raspbian/PiBang)

Updated

sudo apt-get install ruby ruby-devel

(Arch Linux ARM)

pacman -S ruby

Exporting Ruby path (Only for Arch Linux ARM), place this in your <code .bashrc.

PATH="$(ruby -e 'puts Gem.user_dir')/bin:$PATH"  
export PATH  

Installing the Sass gem.

gem install sass --no-ri --no-rdoc  

We can now write our first Sass file.

touch style.scss  

If you prefer SASS then.

touch style.sass  

Once you have added these lines to the file, we can now use sass to compile it.

sass style.scss:style.css  

or

sass style.sass:style.css  

If you have chosen SCSS to view the code below. We are creating a mixin and using it.

@mixin bg($bg-color, $bg-fonts) {
    background-color: $bg-color;
    font-family: $bg-fonts;
}

If you have chosen SASS view the code.

=bg($bg-color, $bg-font)
 background-color: $bg-color
 font-family: $bg-font

body  
 +bg(#ddd, sans-serif)

The CSS output would look something like this for both files.

body {  
  background-color: #dddddd;
  font-family: sans-serif; }

If you want the Sass compiler to actively watch the file changes and update the output this can be done by a simple command.

sass --watch style.scss:style.css  

or

sass --watch style.sass:style.css  

Now you have Sass installed and setup on your Raspberry Pi.

Happy Coding!

OpenNTPD on Raspberry Pi (Arch Linux ARM)

Standard

Raspberry Pi is an ARM based single board computer that does not come with a hardware clock, It depends on the OS to set date and time. If the date and time are not correct it can have really big problems and lead to a really bad disaster. Arch Linux ARM uses NTPD to set the date and time, NTP corrects the date and time every time the Raspberry Pi reboots. If NTPD is failing to set the date and time correctly and you are having trouble getting NTPD set the date and time correctly here is a way to fix it. We will replace NTPD with OpenNTPD, I am using OpenNTPD because this resolved my issue.

Lets fix it!

OpenNTPD does not work with NTPD this will request you to remove NTPD choose y.

pacman -S openntpd  

Enabling OpenNTPD service to startup at boot.

systemctl enable openntpd.service  

Starting OpenNTPD for current session.

systemctl start openntpd.service  

If starting the ‘openntpd’ service does not help, then try this.

ntpd -s -d  

Your OpenNTPD configuration is stored in /etc/ntpd.conf, you can edit this configuration file to add more ntp servers or tailor it to your preference.

Now you have OpenNTPD installed on Arch Linux ARM, If you are having any problem or still can’t fix the date and time issue feel free to leave a comment below.