LESS, Sass, Stylus - CSS Preprocessors

A few months ago I started using CSS preprocessors to write CSS files. When I heard about them I just wanted to see how they work and what they can do but after some days I could see how useful they are. I started with LESS and after getting a good understanding how they work I said that knowing how to use Sass will be nice as well. These days I am using both. Just try them and see which one you prefer. There is also Stylus but to be honest I didn't used/try it.
If you are thinking to start using CSS preprocessors, here are some links and apps which can help you, as well:
LESS home webpage has everything you need to start and to read about. LESS syntax is similar to CSS.
Sass home webpage, Sass Basics, Sass reference contains a lot of useful stuff in the case you want to begin with Sass.
Stylus - the homepage has the necessary documentation.
After you will start reading more about Sass you will notice that some people are using a syntax and some people prefer a different syntax. Yes, both of them are supported, one is based on indentations and { } ; are optional and the other one is more similar to standard CSS. Check Sass vs. SCSS: Which Syntax is Better? to see how they differ.
As I mentioned above you should decide which one you use, but here is an article if you want to have a look: Sass vs LESS.
In order to make preprocessing of Sass and LESS files easier there are a handful of apps to help you. Here are some of them:
- less.app - free (support for LESS files)
- SimpLESS - free (for LESS files, CSS Minification, Cross-browser CCS Prefix using prefixr.com)
- Crunch - free (support for Less files)
- Scout - free (Sass and Compass files)
- Koala - free (Less, Sass, Compass and CoffeeScript compilation)
- Prepos - free + paid (the free version compiles LESS, Sass, SCSS, Stylus, Jade, Slim, Coffeescript, LiveScript, Haml, Markdown, image optimization, js concatenation, browser refresh, built-in http server). Paid option has 1-Click FTP deployment, Team collaboration, ...)
- LiveReload - free + paid (Sass, Compass, LESS, Stylus, CoffeeScript, IcedCoffeeScript, Jade, HAML, SLIM, browser refresh)
- Compass - free + paid (for Sass and Compass, built-in web server, livereload support)
- CodeKit - paid (process Less, Sass, Stylus, Jade, Haml, Slim, CoffeeScript, Javascript, Compass files, minification, optimize images, live browser reload)
- Hammer - paid (SASS - with Bourbon, CoffeeScript, HAML and Markdown)
- Fire.app - paid (Sass, Compass, CoffeScript, browser refresh)
- Mixture - paid (Sass, LESS, Stylus, CoffeeScript and Compass are supported. Images are optimised and built-in support for concatenation is also present.)
If you don't like to have a GUI app you can also use a command line tool, for example: guard-livereload.
Abierto el plazo para la presentación de candidaturas para la celebración de la openSUSE Conference 2015.
La edición 2013 ha sido la primera celebrada lejos de ciudades donde SUSE tiene oficina. Su organización corrió a cargo de la comunidad salvo en aspectos legales y económicos fundamentalmente. La openSUSE Conference 2013 tuvo lugar en Tesalónica, Grecia, en verano, y participaron unas 300 personas.
La edición 2014 se celebrará en Dubrovnik, Croacia en Abril. Ya se está preparando la organización del evento. Desde hace unas semanas, se ha abierto el plazo para la presentación de candidaturas a la celebración de openSUSE Conference 2015.
El evento cuenta con el apoyo de SUSE como principal espónsor. Esto da una garantía importante a la hora de poder organizarlo porque algunos de los gastos básicos de este evento de comunidad están cubiertos de antemano. La comunidad openSUSE asume algunas de las tareas más tediosas de la organización de modo que los organizadores locales no tienen que ocuparse de ellos. Los contenidos y el trabajo relacionado con sponsors también viene dado por la comunidad.
Dicho de otro modo, entre SUSE y la comunidad openSUSE asumen una parte del trabajo lo que garantiza que la organización del evento sea asumible para un reducido número de voluntarios locales. Depende del país y lugar de celebración, SUSE dispone de soporte local lo que facilita la difusión del evento, entre otras tareas.
En definitiva, si tienes experiencia en la organización de eventos de Software Libre, échale un vistazo a openSUSE Conference y presenta tu candidatura.
Lenovo BIOS Update method for Linux and USB thumb drive
If your like me and you don't ever like the methods that are laid out by the manufacturer to burn an ISO to CD or use a Windows Update utility then follow these instructions. Linux Instructions. 1. Get the bios update ISO from the lenovo support site. I have a ThinkPad W530 (2447-23U) You will want to grab your Machine Type (mine was 2447) You will also want to grab your Model (mine was 23U) In order to grab this information you can use dmidecode or hwinfo. Here is a link to the ISO file I downloaded for my Machine type and model. http://support.lenovo.com/en_US/downloads/detail.page?DocID=DS029170#os (g5uj17us.iso) Once you have the right ISO file then move to step 2. 2. Get 'geteltorito' and extract the boot image from the iso. Execute the below commands. $ wget 'http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/geteltorito.pl' $ perl geteltorito.pl g5uj17us.iso > biosupdate.img
Note: if your wondering where to get the geteltorito perl script and the link above is not working for you then you can visit the developers website at http://freecode.com/projects/geteltorito
3. Copy the image to the USB thumdrive once your thumb drive is connected. $ sudo dd if=biosupdate.img of=/dev/usbthumdrive bs=512K Reboot, Press F12 and boot from USB Execute the Flash Utility Have a lot of fun!
Latest Images
I have not been very active with my blog lately. Things are always changing and having time to gather some visuals is harder at times.
Over the past few weeks I have been involved in making some artwork for the openSUSE Summit coming up in November in Florida. It has been a great opportunity to put out some simple designs for our newest conference format. This conference will follo SUSECon set to be right before the Summit. If you are in the Florida area, head on over to summit.opensuse.org and find out the latest about this conference.
In the mean time I took a trip around Utah (my backyard) to see some good landscape and take some pictures. I believe Utah has a lot to offer to those who love the cooler seasons. Its landscape is made up of beautiful mountains and wonderful shrubbery. When fall (Autumn) comes around, many people from all over come to Utah to travel the national parks looking for the perfect changes in leaf color and a mix between patches of snow and amazing sunsets.
Taking this to heart, I dedicated an afternoon to take some shots and test my luck with light. Here are the results. Maybe, even some of these could do for an awesome fall wallpaper.
Enjoy!
Graphics DevRoom at FOSDEM2014.
It's not called the X.org DevRoom this time round, but a hopefully more general Graphics DevRoom. As was the case with the X.org DevRooms before, anything related to graphics drivers and windowing systems goes. While the new name should make it clearer that this DevRoom is about more than just X, it also doesn't fully cover the load either, as this explicitly does include input drivers as well.
Some people have already started wondering why I haven't been whining at them before. Well, my trusted system of blackmailing people into holding talks early on failed this year. The FOSDEM deadline was too early and XDC was too late, so I decided to take a chance, and request a devroom again, in the hope that enough people will make it over to the fantastic madness that is FOSDEM.
After endless begging and grovelling the FOSDEM organizers got so fed up that they gave us two full days again. This means that we will be able to better group things, and avoid a scheduling clash like with the ARM talks last year (where ARM system guys were talking in one room exactly when ARM graphics guys were talking in another). All of this doesn't mean that First Come, First Serve doesn't apply, and if you do not want to hold a talk with a hangover in an empty DevRoom, you better move quickly :)
The FOSDEM organizers have a system called pentabarf. This is where everything is tracked and the schedules are created, and, almost magically, at the other end, all sorts of interesting things fall out, like the unbelievably busy but clear website that you see every year. This year though, it is expected that speakers themselves manage their own details, and that the DevRoom organizers oversee this, so we will no longer use the trusted wiki pages we used before. While i am not 100% certain yet, i think it is best that people who have spoken at the DevRoom (most of whom i will be poking personally anyway) in the past few years first talk to me first before working with pentabarf, as otherwise there will be duplicate accounts which will mean more overhead for everyone. More on that in the actual call for speakers email which will hit the relevant mailing lists soon.
FOSDEM futures for ARM
Connor Abbott and I both have had chromebooks for a long long time. Connor bought his when it first came out, which was even before the last FOSDEM. I bought mine at a time where I thought that Samsung was never going to sell it in germany, and the .uk version arrived on my doorstep 3 days before the announcement for Europe went out. These things have been burning great big holes in our souls ever since, as i stated that we would first get the older Mali models supported properly with our Lima driver, and deliver a solid graphics driver before we lose ourselves again in the next big thing. So while both of us had this hardware for quite a while, we really couldn't touch these nice toys with an interesting GPU at all.Now, naturally, this sort of thing is a bit tough to impose on teenagers, as they are hormonally programmed to break rules. So when Connor got bored during the summer (as teenagers do), he of course went and broke the rules. He did the unspeakable, and grabbed ARMs standalone shader compiler and started REing the Mali Midgard ISA. When his father is at FOSDEM this year, the two of us will have a bit of 'A Talk' about Connors wild behaviour, and Connor will be punished. Probably by forcing him to finish the beers he ordered :)
Luckily, adults are much better at obeying the rules. Much, much better.
Adults, for instance, would never go off and write a command stream tracer for this out of bounds future RE project. They would never ever dare to replay captured command streams on the chromebook. And they definitely would not spend days sifting through a binary to expose the shader compiler of the Mali Midgard. Such a thing would show weakness in character and would just undermine authority, and I would never stoop so low.
If I had done such an awful thing, then I would definitely not be talking about how much harder capture and replay were, err, would be, on this Mali, and that the lessons learned on the Mali Utgard will be really useful... In future? I would also not be mentioning how nice it would be to work on a proper linux from the get-go. I would also never be boasting at how much faster Connor and I will be at on turning our RE work on T6xx into a useful driver.
It looks like Connor and I will have some very interesting things to own up to at FOSDEM :)
Kraft Release 0.53
Only short time after Kraft’s release 0.51 I am announcing version 0.53 today. Kraft is the KDE software that helps you to handle your daily quotes and invoices in your small business.
The new release fixes a problem with the tarball of 0.51 which contained a wrong source revision. That did not cause any harm, but also did not bring the announced fixes. That was brought up by community friends, thanks for that.
Additionally another, actually the last known bug of Kraft’s catalog management was fixed. That was the problem that it did not work to drag sub chapters onto the top level of the catalog. That is working now.
Please update to the new version and help us with your feedback.
A Cosmic Dance in a Little Box
It’s Hack Week again. This time around I decided to look at running TripleO on openSUSE. If you’re not familiar with TripleO, it’s short for OpenStack on OpenStack, i.e. it’s a project to deploy OpenStack clouds on bare metal, using the components of OpenStack itself to do the work. I take some delight in bootstrapping of this nature – I think there’s a nice symmetry to it. Or, possibly, I’m just perverse.
Anyway, onwards. I had a chat to Robert Collins about TripleO while at PyCon AU 2013. He introduced me to diskimage-builder and suggested that making it capable of building openSUSE images would be a good first step. It turned out that making diskimage-builder actually run on openSUSE was probably a better first step, but I managed to get most of that out of the way in a random fit of hackery a couple of months ago. Further testing this week uncovered a few more minor kinks, two of which I’ve fixed here and here. It’s always the cross-distro work that seems to bring out the edge cases.
Then I figured there’s not much point making diskimage-builder create openSUSE images without knowing I can set up some sort of environment to validate them. So I’ve spent large parts of the last couple of days working my way through the TripleO Dev/Test instructions, deploying the default Ubuntu images with my openSUSE 12.3 desktop as VM host. For those following along at home the install-dependencies script doesn’t work on openSUSE (some manual intervention required, which I’ll try to either fix, document, or both, later). Anyway, at some point last night, I had what appeared to be a working seed VM, and a broken undercloud VM which was choking during cloud-init:
Calling http://169.254.169.254/2009-04-04/meta-data/instance-id' failed Request timed out
Figuring that out, well… There I was with a seed VM deployed from an image built with some scripts from several git repositories, automatically configured to run even more pieces of OpenStack than I’ve spoken about before, which in turn had attempted to deploy a second VM, which wanted to connect back to the first over a virtual bridge and via the magic of some iptables rules and I was running tcpdump and tailing logs and all the moving parts were just suddenly this GIANT COSMIC DANCE in a tiny little box on my desk on a hill on an island at the bottom of the world.
It was at this point I realised I had probably been sitting at my computer for too long.
It turns out the problem above was due to my_ip being set to an empty string in /etc/nova/nova.conf on the seed VM. Somehow I didn’t have the fix in my local source repo. An additional problem is that libvirt on openSUSE, like Fedora, doesn’t set uri_default="qemu:///system". This causes nova baremetal calls from the seed VM to the host to fail as mentioned in bug #1226310. This bug is apparently fixed, but apparently the fix doesn’t work for me (another thing to investigate), so I went with the workaround of putting uri_default="qemu:///system" in ~/.config/libvirt/libvirt.conf.
So now (after a rather spectacular amount of disk and CPU thrashing) there are three OpenStack clouds running on my desktop PC. No smoke has come out.
- The seed VM has successfully spun up the “baremetal_0” undercloud VM and deployed OpenStack to it.
- The undercloud VM has successfully spun up the “baremetal_1” and “baremetal_2” VMs and deployed them as the overcloud control and compute nodes.
- I have apparently booted a demo VM in the overcloud, i.e. I’ve got a VM running inside a VM, although I haven’t quite managed to ssh into the latter yet (I suspect I’m missing a route or a firewall rule somewhere).
I think I had it right last night. There is a giant cosmic dance being performed in a tiny little box on my desk on a hill on an island at the bottom of the world.
Or, I’ve been sitting at my computer for too long again.
Automatically Login to wifi.free.fr Wifi
The not so expansive French mobile phone operator free.fr offers some nice extras for their clients. People can use the free.fr hotspots, which you can find at many places in French cities. Unfortunately you have to login manually using the gateway page https://wifi.free.fr/ for every wifi reconnect. Ähm – do you really have to? :wink:
I’m one of these lucky guys who can actually receive this hotspot in the own flat. So why should I pay extra for cable internet?
To still have some selling points for ADSL customers free.fr doesn’t make it very convenient to use this free wifi. The network comes without any security modes like WPA/WPA2/WAP, but requires you to authenticate yourself an a gateway page every time you reconnect to the network. There is only one other option which incorporates SIM card authentication which is not an option for most computers due to the lack of a SIM card.
So why not using curl to send automatically an POST request with your login data as soon as you got connected to the so-called “FreeWifi” network?
Using openSuSE 12.3 or any other Linux distribution based on NetworkManager you just place the following file freewifi-up in /etc/NetworkManager/dispatcher.d.
# file: 'freewifi-up'
#! /bin/sh
#
# auto login freewifi from free.fr
#
#
. /etc/rc.status
case "$2" in
up)
if iwgetid | grep -qs :\"FreeWifi\"; then
curl -s --retry 10 --retry-max-time 0 -X POST -d 'login=000000000&password=mypassword&submit=Valider' https://wifi.free.fr/Auth > /dev/null
fi
;;
*)
exit 0
;;
esac
The actual name of the file is not very important. But pay attention to set the appropriate file rights chmod 755 freewifi-up. Of course, you have to replace the login number and the password by your own.
The script will be run by networkmanager automatically when the connection status get changed. Only if a connection was setup the wifi SSID will be checked to be FreeWifi. Only In this case an authentication request will be send to the gateway webpage.
Hackweek: Hot Chili Sauce for Hot Lizards
This hot sauce can be used to spice up your food, give you creative
energy, and is a nice gift for your friends and family members — not
only for Hackweek.
Name: hot-chili-sauce
Summary: Toms’s Hot Chili Sauce
License: BSD
Version: 1.0
Group: Cooking/Sauce/Chili
# Ingredients
#
Requires: chili => 5pcs
Requires: sugar = 3pcs
Requires: ginger = 30gr
Requires: vinegar = 3tbsp
Requires: water = 250ml
# Equipment
#
Requires: libfunnel
Requires: libglassjars-multiple => 50ml
Requires: libcookingpots
Requires: libtap
#
Recommends: salt
Recommends: wheat-flour
%description
This hot sauce can be used to spice up your food, give you creative
energy, and is a nice gift for your friends and family members -- not
only for Hackweek.
%prep
%setup
head /dev/tap/water > /dev/pot1/WATER
mv /dev/jars > /dev/pot1
heat --target-temp 100C --gentle /dev/pot1
%build
%define very_hot 1
%define thicken 0
split -b 5 CHILI1 chili/CHILI1-CHOPPED
split -b 5 CHILI2 chili/CHILI2-CHOPPED
split -b 5 CHILI3 chili/CHILI3-CHOPPED
%ifdef %{very_hot}
split -b 5 CHILI4 chili/CHILI4-CHOPPED
split -b 5 CHILI5 chili/CHILI5-CHOPPED
%endif
peel GINGER > PEELED_GINGER && split -b 5 PEELED_GINGER ginger/GINGER-CHOPPED
peel GARLIC > PEELED_GARLIC && split -b 5 PEELED_GARLIC garlic/GARLIC-CHOPPED
mv SUGAR /dev/pot2
heat --target caramel /dev/pot2
mv chili/* garlic/* /dev/pot2
heat --time 5min --target-temp 80C /dev/pot2
mv ginger/* SALT WATER VINEGAR /dev/pot2
stir --dont-shake /dev/pot2
mv TOMATO_PASTE /dev/pot2
heat --time 15min --target-temp 100C /dev/pot2
%ifdef %{thicken}
mv WHEAT-FLOUR /dev/pot2
%endif
%install
# FIXME: add adequate safety measures. This is hot.
mv /dev/pot1/jars /dev
mv /dev/pot2/* /dev/jars
seal /dev/jars && turn /dev/jars
sleep 60m
%files /dev/jars



































