25 April, 2015

Install Ruby on Rails on Linux Mint

Reading article i WebDesigner /233:70 on Ruby on Rails. Running RoR on Linux Lime is not that straightforeward. Here's what I did:

Bundle install could not install sqlite3. Solution:

# apt-get install libsqlite3-dev
# bundle install

Tried to start a server. But got an error.

# sudo gem install therubyracer
# sudo apt-get install nodejs

Then the server worked.

22 April, 2015

How to show code in a WordPress post

Simply convert the code to html via Pandoc. Something like this:

# pandoc codefile.foo > html.html

Or simply:

# pandoc codefile.foo

And the rest is copy paste.

21 April, 2015

Pandoc slides

I made a markdown slideshow but got an error message when I wanted to convert the .md to .pdf. Here's a Linux Mint solution.

Error:

pandoc: Error producing PDF from TeX source.
! LaTeX Error: File `beamer.cls' not found.

Type X to quit or to proceed,
or enter new name. (Default extension: cls)

Enter file name:
! Emergency stop.

       
l.2 \usepackage

Solution:

# sudo apt-get install latex-beamer

Then the code worked like a charm:

# pandoc lastlesson.md -t beamer -o myslides.pdf

19 April, 2015

Lyx to markdown

Export from Lyx to Latex. Then convert the .tex file to markdown via Pandoc:

# pandoc --no-wrap -f latex -t markdown myfile.tex > myfile.md

Pandoc A4

# pandoc index.markdown -o x.pdf -V papersize:"a4paper"

18 April, 2015

Markdown

I need more and more info about markdown. E.g. how to add pictures and similar

See here!.

BTW this is how to do it in Pandoc / Dexy:

![Screendump](billeder/screendump.png "Screendump")

Full Webpage Capture

Stephen Hay recommends rapid prototyping. In the workflow he'll use full screen webpage captures. As an alternative to the .js capture method you could install a web page capture app on your browser. "ExtensionFull Page Screen Capture" can do this. And here's a shot of a recent style tile:


If you use the Web Developer tools and watch the webpage in some mobile device the "ExtensionFull Page Screen Capture" is able to grab such a page too.


Hay propose to use such images in a pitch at an early stage of the web developent process. Here I have combined the idea with style tiles.

03 April, 2015

A KDE program launcher shortcut



KDE does not ship with a program launcher shortcut. The "windows" or much better meta key is used for combinations. So you have to invent some shortcut. I have chosen meta + space.

Finding the settings was not easy. I gave up following the googled instructions. Many were far out in the green nerdy weeds. But try this:

  1. Right-click on the K icon (bottom left).
  2. Panel settings > panel settings
The window above will open. Click the shortcut symbol - and enter your shortcut.

Flipped Classroom and Linux

For a screencast install gtk-recordmydesktop. On KDE the icon is found in the Video section of the programmes.

# sudo apt-get install gtk-recordmydesktop

For better sound quality use an external microphone.

You'd probably need a video editor. I use OpenShot.

# sudo apt-get install openshot

SSH and One.com

So now you can use SSH for your webhotels at One.com. Very nice - because the terminal is a very powerfull tool. FYI this stuff is available:

  • ssh yoursite.what@yoursite.what
  • mc
  • git
  • Your website is located in /www
  • nano / pico

26 March, 2015

xampp cannot use wordpress theme images

A localhost WordPress could not display images from the themes folder in Xampp on a Linux Mint system.

Solution: all folders must be owned by the Apache user and group (daemon:daemon), or:

# chown -R daemon:daemon [theWordPressThemenameFolder/]
# chmod -R 777 [theWordPressThemenameFolder/]

However this is only for development purposes. On a server work by these guidelines.

23 March, 2015

Install themes on WordPress (Xampp on Linux)

Do this:

# cd /opt/lampp/
# sudo chown -R daemon htdocs
# sudo chmod -R g+w htdocs

On Apache the user is called daemon, therefore chown -R daemon htdocs.

Thanx to this post (my solution is for Linux the former was for Mac).

Now you can install whatever themes on the fly from the WordPress Dashboard.

16 March, 2015

Start the Xampp panel on linux

(64bit) # sudo /opt/lampp/manager-linux-x64.run
(32bit) # sudo /opt/lampp/manager-linux.run

03 March, 2015

Jquery - run it on localhost

Sometimes Jquery needs to run on a server. The accordion plugin is a sample. If you run the code directly from a directory, the darn thing does not work. If you run the same code on your localserver it works fine.

Below: Jquery accordion from a file


Below: Jquery from localhost

Ergo: run Jquery scripts on your localhost or on a server.

11 February, 2015

Drupal Install

In the new version the default settings could not be created. This seems to work:

$ mv default.settings.php settings.php
$ touch default.settings.php

08 February, 2015

Raspberry Pi - thoughts

I love the idea of the Raspberry Pi. But often I tend to just do the exercises on one of my several Linux systems. The creative ideas for projects of the many hands on projects in the community is a source of great inspiration. I have made a smart-TV, and reused an old telle for that purpose. Xbmc runs like a charm on it. Perhaps I'll use the smart-tv in the kitchen for todolists, recipe browsing and similar.

31 January, 2015

Galaxy S3 Cannot Use SD card

For a week or so my Galaxy S3 use, see or format the SD-card. Tried restart, taking SD out etc. but nothing worked. Empty slots for notworking programs are all over the phone. Could not remove the non-existing apps - which is messy and weird.

Log ...
  • Software update - did not help.
  • Reset to factory settings - 
One week later

So far no progress. By now I just use the phone for talk and sms. So not-smartphone. Trying another update.

Found this - it seems that the SanDisk app is the cause of the problem.

27 January, 2015

Comtrol DSLR camera via USB from commandline in Linux

My first gphoto2 image


Install gphoto2

# sudo apt-get install gphoto2
Run gphoto2 from the commandline. Here are some options:

# gphoto2 --capture-image-and-download

The camera will take a picture, and save it to the active folder.

# gphoto2 --list-device

Will tell the name of your camera.

On my SONY A58 the USB-setting in the menu must be "remote PC".

For samples see the man file, or "Using gphoto2".



After installing gphoto2 you can write a bashscript and call it automaticly via anacron or crontab.

In order to see whether your PC is able to connect to the cam, try this:

# gphoto2 --auto-detect

Model                          Port                                           
----------------------------------------------------------
Sony SLT-A58 (Control)         usb:001,015    

20 December, 2014

Yousee - Linux? No webtv.

Yousee really sucks big time. No Linux support for the web tv. Perhaps I should look for an alternative TV provider.

13 December, 2014

Boot problems

A Debian system would not boot. A file system check failed. The PC is around 6-7 years old. So perhaps the disk is old and sore.

Perhaps the whole system need a total makeover. I bought Linux Format downtown, and fired up a Slax in the RAM. The Slax file manager had mounted the local drives of the system. So by now my data could be saved.
  1. Format a USB drive for the backup.
  2. Back up all data in /home/ via rsync 
  3. Install Ubuntu U.U. - KDE version.
  4. Restore via rsync.
Worked like a charm. It seems that my very old PC just needed a brush up.