Skip to content

Instantly share code, notes, and snippets.

View sveetch's full-sized avatar
🥝
I'm a kiwi

David THENON sveetch

🥝
I'm a kiwi
View GitHub Profile
@sveetch
sveetch / round-font-icon-mixin.scss
Last active August 25, 2017 23:39
Mixin to make generic rounded border on font icon
/*
* Mixin for generic rounded webfont icon
*
*/
@mixin -emencia-round-font-icon(
$inner-padding: 1rem,
$font-size: 2rem,
$color: $black,
$border-width: 0.1rem,
$border-color: null
@sveetch
sveetch / codemirror_datas_extract.py
Created August 31, 2016 22:52
Some datas about CodeMirror components used for djangocodemirror dev
# -*- coding: utf-8 -*-
"""
Some tools to extract datas about codemirror components (modes, themes)
This is only designed to developers. You will have to use it like so: ::
python extract.py
"""
import os, json
@sveetch
sveetch / fabfile.py
Last active July 10, 2016 20:35
Fabric tasks basic sample
# -*- 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;
@sveetch
sveetch / quassel_logs.py
Last active June 28, 2016 22:22
Some very basic code to search for a content in Quassel logs
# -*- 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
@sveetch
sveetch / casperjs_authenticator.js
Created January 19, 2016 23:28
CasperJS script to authenticate and store persistent cookie through profile for SlimerJS
/*
*
* This is a CasperJS script.
*
* It try to authenticate so the session cookie can be stored in current profile
* and then BackstopJS+CasperJS+SlimerJS can use the same cookie during tests.
*
* Scenario
* ========
*
@sveetch
sveetch / patch_stylesheet_imports.py
Created January 10, 2016 17:23
Basic script to patch Stylesheet import paths
# -*- 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).
@sveetch
sveetch / app.js
Last active December 9, 2015 09:16
MediaQuery watcher for Foundation5.4.x
/*
* Sample app Javascript initializer to demonstrate usage of 'mediaquery-watcher.jquery.js'
*/
$(document).ready(function($) {
// Init MediaQuery watcher
$('#watch-for-current-mquery').initCurrentMediaQuery();
$('#watch-for-current-mquery').watchForCurrentMediaQuery();
/*
* Initialize Foundation after all event is binded
@sveetch
sveetch / Gruntfile.js
Last active September 28, 2015 16:55
Asset management attempt with Gruntjs
/**
* Grunt config
*/
module.exports = function(grunt) {
var project_dir = 'project/',
static_dir = project_dir+'webapp_statics/',
asset_manifest = grunt.file.readJSON(project_dir+'assets.json'),
prepend_staticdir = function(file_map) {
for(var keyname in file_map){
var distkey = static_dir+keyname;
@sveetch
sveetch / MANIFEST.xml
Last active December 23, 2017 15:49
Recalbox Rom systems Manifest
<?xml version='1.0' encoding='UTF-8'?>
<systems>
<system key="atari2600" name="Atari 2600">
<extensions>
<extension>a26</extension>
</extensions>
<download_links>
<link>http://www.planetemu.net/roms/atari-2600</link>
</download_links>
</system>
@sveetch
sveetch / _flexbox_support.scss
Created May 26, 2015 15:06
SCSS mixins to add support for Flexbox prefixes for IE10
@import "compass/css3";
@import "compass/css3/shared";
// For more information see https://gist.github.com/cimmanon/727c9d558b374d27c5b6
// NOTE:
// -----
// All mixins for the @box spec have been written assuming they'll be fed property values that
// correspond to the standard spec. Some mixins can be fed values from the @box spec, but don't