This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Strip unit from a number value | |
// Usage : | |
// strip-units(16px); | |
// Will return "16" (as a number) | |
@function strip-units($number) { | |
@return $number / ($number * 0 + 1); | |
} | |
// Write font-size rules for each given breakpoint, the font-size is calculated for each | |
// breakpoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Recherche d'un motif dans tout les fichiers *.py ou *.html récursivement à | |
# partir de l'emplacement courant | |
alias oukilai='find . \( -name \*.py -o -name \*.html -o -name \*.css -o -name \*.scss -o -name \*.sass \) -type f | xargs grep $1 -I --color=auto -n -o' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Command line tool to browse the full url map | |
""" | |
from optparse import make_option | |
from django.utils.termcolors import colorize | |
from django.conf import settings | |
from django.core.management.base import CommandError, BaseCommand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from django.template import Library | |
register = Library() | |
@register.filter | |
def truncatestring(value, limit=125): | |
""" | |
Coupe une chaine après un certains nombre de caractères | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Simple strings extractor from a Photoshop XMP file | |
It extract all <photoshop:LayerText/> text from the document then output it in a file. | |
""" | |
import os | |
from xml.etree.ElementTree import ElementTree as ET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -U 4 -N -r zinnia/admin/entry.py zinnia_patch/admin/entry.py | |
--- zinnia/admin/entry.py 2013-09-10 22:19:42.897479915 +0200 | |
+++ zinnia/admin/entry.py 2013-09-10 21:48:27.336230712 +0200 | |
@@ -323,8 +323,11 @@ | |
'', | |
url(r'^autocomplete_tags/$', | |
self.admin_site.admin_view(self.autocomplete_tags), | |
name='zinnia_entry_autocomplete_tags'), | |
+ url(r'^ckeditor/$', | |
+ self.admin_site.admin_view(self.ckeditor), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jQuery Plugin to change various content (images, text, css) on various | |
* element from a menu | |
* | |
* by default the loading spinner usage needs to hide the menu and display the spinner, | |
* this is at your responsability in your CSS, also it's yours to provide the | |
* spinner (as an image, background CSS, etc.. as you like) | |
* | |
* Usage sample : | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
This should enforce relative @import using the full path in sass files | |
Problem is, Compass resolve relative path as relative to the current file even into sass libraries. | |
'libsass' does not do that and allways resolves relative path to the current sass source file directory. | |
So some sass library like Foundation use the way from Compass do (and like node-sass seems to do also with some sugar). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Very basic code to search within logs from Quassel IRC client | |
Tested on Quassel v0.10.0 (dist-575f27e) | |
""" | |
import sqlite3 | |
import os | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Some ssh script stuff using 'fabric' | |
My personnal environment use ssh keys with passphrase | |
(some empty, some other not) to connect to knowed hosts. | |
Install requires: | |
* Needed C build toolchain to compile C modules; |