Skip to main content


 
Now it's Christmas!

Immagine/foto

Sandro kensan 2 mesi fa
It is the freedom of the open source and free software: everybody can think different and coders offer the options.

Fabio 2 mesi fa
But! But! It's a cone with an hat!! :-P




 

Add Bootstrap css classes to form fields in django templates


I'm doing a #django project with bootstrap css templates.

I'm using generic edit class based views, like django.views.generic.edit.CreateView.

Now I want to add form-control class to all the fields in template.
I did't found an 'official' way to do it, so I've done the quickest hackish way I found, with a little tweak: a template filter to add css classes to fields.

The original tip I found on The Internet® was

@register.filter
def addcss(field, css):
return field.as_widget(attrs={''class':css})



Which works, but hei, I cant chain other field-related filters to it.. so:

@register.filter
def addcss(field, css):
css_class_list = field.field.widget.attrs.get("class", "")
css_class_list = css_class_list + " " + css
field.field.widget.attrs["class"] = css_class_list
return field



The template:

...
{% for field in form %}
<div class="form-group">
<label for="{{ field.auto_id}}">{{ field.label }}</label>
{{ field|addcss:"form-control" }}
</div>
{% endfor %}
...


 

Worlds first 32 bit Homebrew CPU

There is a major CPU that is missing from the world. A 32 bit homebrew CPU that implements a full and modern instruction set. The solution is to use 74' series logic chips and the RISC-V open source instruction set architecture. With a GNU toolchain already created for RISC-V it means we already have an assembler and compiler ready and waiting for our machine. So lets get rocking and create the ultimate in homebrew projects.


 

Mailpile: Too Cool for PGP

Some kids are just too cool for school.

And some security experts are too cool for OpenPGP.

It's almost become a rite of passage for security folks: work in the trenches, build a reputation, climb the ivory tower, write a detailed epiphany about why you've given up on PGP. Suggest we all buy an iPhone and use Signal, start giving people phone numbers instead of e-mail addresses......



 
Christmas Cookies

Immagine/foto

Fabio 2 mesi fa
in ufficio.. eh.. ti aspetto per pranzo?

Tobias 2 mesi fa
They are looking good :-)




 

Making an MSX font

I figured, for this and future posts I have planned about MSX, that I wanted an MSX font face. I browsed the web a bit for one and found nothing that I liked...
#msx
#msx
Fabio 2 mesi fa
Immagine/foto

uhuhuh

Fabio 2 mesi fa
and it's even better with

export PS1="\#0 \h:\W \u\$ "

:-D

Tobias 2 mesi fa
hihi :-)





 
[attachment type='link' url='http://peeqo.com/' title='Peeqo - The GIF Bot ']Peeqo is the world's first robot to respond entirely through GIFs[/attachment]http://imgur.com/a/ue4Ax




 

PHP & XDebug remote debugging


For remote debug with xdebug I've tried this
https://github.com/robertbasic/pugdebug
and
https://addons.mozilla.org/en-US/firefox/addon/the-easiest-xdebug/

worked like a charm...

If someone of you is on #ArchLinux , there is a nice package on aur
https://aur.archlinux.org/packages/pugdebug-git/
Questa voce è stata modificata (3 mesi fa)


 

Vanilla JS

Vanilla JS is a fast, lightweight, cross-platform framework
for building incredible, powerful JavaScript applications.
#lol


The Vanilla JS team takes pride in the fact that it is the most lightweight framework available anywhere; using our production-quality deployment strategy, your users' browsers will have Vanilla JS loaded into memory before it even requests your site.

To use Vanilla JS, just put the following code anywhere in your application's HTML:

<script src="path/to/vanilla.js"></script>

When you're ready to move your application to a production deployment, switch to the much faster method:



That's right - no code at all. Vanilla JS is so popular that browsers have been automatically loading it for over a decade.
#lol
Marco R. 3 mesi fa da Friendica for Android
Incredible! I should use it in my App... :-)



 
Referendum costituzionale, occhio alla rimonta - Il Fatto Quotidiano - http://www.ilfattoquotidiano.it/premium/articoli/occhio-alla-rimonta/
Sandro kensan 3 mesi fa
Ho visto ieri sera che i sondaggi clandestini danno un distacco di 6 punti, non abbastanza per essere sicuri che vinca il NO ma si può dire occhio alla rimonta che non c'è. Comunque saranno le urne a decidere a meno di brogli sulle circoscrizioni estere.




 

Tutorial — ownCloud Developer Manual 9.1 documentation

This tutorial will outline how to create a very simple notes app. The finished app is available on GitHub.
#owncloud #php #develpment