27 September, 2016
15 September, 2016
Webp and Linux
Install the package webp:
# sudo apt-get install webp
Now you can convert image files with cwebp:
# cweb file.png -o file.webp
Or decompress via dwebp.
# sudo apt-get install webp
Now you can convert image files with cwebp:
# cweb file.png -o file.webp
Or decompress via dwebp.
08 September, 2016
Windows improved
Today's work on a Windows system was pleasant. W10 is a great improvement. But I still prefer Linux.
01 September, 2016
Tex to Docx
So you want to translate .tex to .dex? It's easy. Use pandoc:
# /home/per/Dropbox/ddfo/sit_lux/synopsis.tex
# /home/per/Dropbox/ddfo/sit_lux/synopsis.tex
31 August, 2016
Cannot connect to Philips Hue
For some reason Philips Hue cannot get an ip-address it seems. So the system is basicly useless. I have tried several reboots of the router, the Hue thing etc. Nothing has helped so har.
I suspect an error because my Android phone wants the same IP. However if I turn off the phone and boot from rock bottom there is only light in two LEDs.
I suspect an error because my Android phone wants the same IP. However if I turn off the phone and boot from rock bottom there is only light in two LEDs.
30 August, 2016
Synchroniz Tomboy Notes
If you have more than one computer: save the notes on Dropbox. Then synchronize your systems with that folder. It works like a charm.
26 August, 2016
Docx - cannot print properly from Linux
Skyprinting from Linux or Windows does not give the same result. I'm not printing from Libre Office. I just upload the file from the directory. My conclusion: .docx is not an open format at all. You have to print from Windows.
15 August, 2016
Latex and Your Organization
As a researcher and author it's obvious to write in the Latex format. But when you hand in your work, you often have to downscale to some MS Word .docx template. I can do it. But I don't love .docx.
13 August, 2016
Lyx Debugging
Getting an error in Lyx is pretty normal. That is when you try to compile to .dvi or .pdf. But how can you edit an error in myfile.lyx in line 666? From inside Lyx it's not possible to edit the source. As far as I know, that is.
So, the quick a dirty solution is:
So, the quick a dirty solution is:
- Get out of the file in Lyx.
- Open the file in your favorite editor (vi, nano, gedit ... etc.)
- Go to the line with an error.
- Fix or remove whatever seems wrong.
- Save and open the file in Lyx again.
- Compile ... and hope for the best.
06 August, 2016
Lyx header for a Paper
Latex header sample.
- Colored table cells
- Author / year bibliography
- Somewhat scalable tables
The Latex header:
\usepackage{comment}
\begin{comment}
TABELLER FARVER OG MULTICOLUMN
Formatterer farvede tabeller.
Husk: man kan definere farvekoder.
\end{comment}
\usepackage{multirow}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\begin{comment}
HEADER OG FOOTER
Indsæt herunder
\end{comment}
\lhead{"Et in arcadea ego"}
\rhead{Per Thykjær Jensen}
\chead{2016}
\bibliographystyle{plainnat}
\usepackage{graphicx}
17 July, 2016
HP Elitebook / Ubuntu Studio: battery decharge after shutdown
Trying this recipe.
# sudo -i
# gedit gedit /etc/default/grub
Change the line to:
# sudo -i
# gedit gedit /etc/default/grub
Change the line to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"
06 July, 2016
Dropped Linux Mint
Well ... I tried and tried, but never found a cure fore the unstable wifi under Linux Mint. So I dropped Mint in favor of Ubuntu Studio Edition. I teach multimedia design. So it must be a good match.
LInux MInt: unstable wifi
Yep, it's still a problem. Tried this recipe: http://ubuntuforums.org/showthread.php?t=1980142
26 June, 2016
Linux Mint: Network Manager Headache
The network manager unconnects randomly. It's annoying during streams or online games. I have tried to install wicd, but cannot make the network manager inactive.
Removing the darn thing results in a dark screen. It's almost a Windows blue screen of death experience. And I've had this experience twice.
So now I'm left with a blank screen, gde hangs.
What are my options? Trying:
Perhaps the HP EliteBook favors another Linux flavour?
The trick worked. After installing KDE wicd runs like a charm .. in KDE that is.
Removing the darn thing results in a dark screen. It's almost a Windows blue screen of death experience. And I've had this experience twice.
So now I'm left with a blank screen, gde hangs.
What are my options? Trying:
- Install KDE
- apt-get install kde-full
Perhaps the HP EliteBook favors another Linux flavour?
The trick worked. After installing KDE wicd runs like a charm .. in KDE that is.
20 June, 2016
Gulp
I've experimented with automation, here's the first Gulp file (yea, it's work in progress).
/*
GULP - watch and compile code
=============================
File: gulpfile.js
Version: 0.1
Tags: Sass watch, Sass compile
By: Per Thykjaer Jensen
Url: http://multimusen.dk/
## Howto
1. Download plugin
2. Require the plugin
3. Define a gulp.task
Run the task either:
* :: gulp [taskname]
* or add the task to the gulp.task default and run via :: gulp
Best Practise
=============
Separate your working files into a src/ and a dest/ directory.
This is my first playground, so the pressent file
structure is a darn mess.
*/
//'use strict';
// === Gulps ===
var gulp = require('gulp');
var sass = require('gulp-sass');
// sass compiler
gulp.task('sass', function () {
return gulp.src('./sass/**/*.scss')
.pipe(sass.sync().on('error', sass.logError))
.pipe(gulp.dest('.'));
});
// watcher
gulp.task('sass:watch', function () {
gulp.watch('./sass/**/*.scss', ['sass']);
});
// sass lint
var sassLint = require('gulp-sass-lint');
gulp.task('sassLint', function () {
gulp.src('sass/**/*.s+(a|c)ss')
.pipe(sassLint())
.pipe(sassLint.format())
.pipe(sassLint.failOnError());
});
// minify images
var imagemin = require('gulp-imagemin');
gulp.task('imageMin', function () {
gulp.src('images/*')
.pipe(imagemin())
.pipe(gulp.dest('images/mini'));
});
// === Javascript Lint ===
var jslint = require('gulp-jslint');
var jshint = require('gulp-jshint');
gulp.task('lintJs', function () {
return gulp.src(['js/*.js'])
.pipe(jshint({ /* lint placeholder */ }))
.pipe(jshint.reporter());
});
// === Jade Template Engine ===
jade = require('gulp-jade');
// run this task by typing in gulp jade in CLI
gulp.task('jade', function() {
return gulp.src('src/templates/**/*.jade')
.pipe(jade()) // pip to jade plugin
.pipe(gulp.dest('builds/development'));
});
// === Default ===
gulp.task('default', [
'sass',
'sass:watch',
'imageMin',
'lintJs'], function() {
});
16 June, 2016
Write permission in /var/www/html/
#
sudo usermod -a -G www-data[USERNAME]# sudo chmod -R g+w /var/www# su [USERNAME]
ad 1) Add the user to the www-data groupad 2) Give write permissions to the group in /var/wwwad 3) Be that user and edit 28 April, 2016
21 April, 2016
Noscript: a candidate for the most useless plugin for Firefox
Tried the Noscript plugin for Firefox. Yeah: it really blocked all
scripts. And nothing worked. Not even a search on Duckduckgo. My browser
was probably secured.
But it was also totally useless.
So I decided to dump the darn thing.
But it was also totally useless.
So I decided to dump the darn thing.
16 April, 2016
CakePhp still sucks
Well, I just gave CakePHP one more chance. After a whole day of errors, I guess that enough is enough. Again: the system sucks big time.
Ruby server: the long and winding road
Not elegant, mostly try and error. Eventually everything seems to work, here's the history:
234 sudo apt-get install build-essential
235 rails server
236 rails
237 ls
238 cd rails
239 bin/rails server
240 ls
241 cd blog
242 bin/rails server
243 gem install bundler
244 sudo gem install bundler
245 bin/rails server
246 bundle install server
247 bundle install
248 gem install json
249 sudo gem install json
250 rails server
251 bundle install
252 sudo apt-get install libgmp-dev
253 sudo apt-get install libgmp-dev
254 rails server
255 bundle install
256 sudo apt-get install ruby-full build-essential
257 sudo apt-get install apache2 apache2-mpm-prefork apache2-prefork-dev
258 sudo apt-get install rubygems
259 rails -v
260 sudo apt-get install rails
261 sudo gem install rails
262 rails -v
263 gem update --system
264 \curl -L https://get.rvm.io | bash -s stable --rails
265 rails -v
266 bundle install
267 rails -v
268 rails server
234 sudo apt-get install build-essential
235 rails server
236 rails
237 ls
238 cd rails
239 bin/rails server
240 ls
241 cd blog
242 bin/rails server
243 gem install bundler
244 sudo gem install bundler
245 bin/rails server
246 bundle install server
247 bundle install
248 gem install json
249 sudo gem install json
250 rails server
251 bundle install
252 sudo apt-get install libgmp-dev
253 sudo apt-get install libgmp-dev
254 rails server
255 bundle install
256 sudo apt-get install ruby-full build-essential
257 sudo apt-get install apache2 apache2-mpm-prefork apache2-prefork-dev
258 sudo apt-get install rubygems
259 rails -v
260 sudo apt-get install rails
261 sudo gem install rails
262 rails -v
263 gem update --system
264 \curl -L https://get.rvm.io | bash -s stable --rails
265 rails -v
266 bundle install
267 rails -v
268 rails server
03 April, 2016
Lyx and Bibtex: convert .bib file to 8859-1
- Install KbibTex.
- Open your .bib file.
- Save as ....bib - and remember so set the fileformat to 8859-1.
26 March, 2016
Processing - cross platform
Processing can export to Windows and Linux. For a Mac you need a developer license. Alternative: publish in Python. In the wiki it's said that you need to run OS X in order to export to that OS.
02 March, 2016
WordPress Xampp on Mac - how to install themes or plugins
On a Mac WordPress via Xampp you cannot install themes or plugins because of the settings. In a terminal do like this:
# sudo -i
# (write your password)
# cd /Applications/Xampp/xamppfiles
Now find out where your WordPress files are and cd to the relevant folder, then do something like this:
# chmod -R 777 wordpress/
# chown daemon:daemon wordpress/
Now ... this is a quick and very, very dirty fix. In a production environment the folders should have chmod 755 and the files chmod 644.
# sudo -i
# (write your password)
# cd /Applications/Xampp/xamppfiles
Now find out where your WordPress files are and cd to the relevant folder, then do something like this:
# chmod -R 777 wordpress/
# chown daemon:daemon wordpress/
Now ... this is a quick and very, very dirty fix. In a production environment the folders should have chmod 755 and the files chmod 644.
Subscribe to:
Posts (Atom)
