Skip to content

Instantly share code, notes, and snippets.

View matchaxnb's full-sized avatar

Matcha matchaxnb

View GitHub Profile
#!/bin/env python
def parse_file(path):
parent = [None]
prevobj = None
prevlev = -1
objs = []
with open(path) as f:
for line in f:
""" fill object infos """
@matchaxnb
matchaxnb / fb-userstyle.css
Created March 31, 2015 10:33
Facebook for short-sighted people like me (for Firefox)
/*
By Chloé Tigre Rouge
Public Domain or MIT license at the option of the user
*/
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("www.facebook.com") {
/* font sizes for main content area */
body, #contentArea p, div[role="main"] p
@matchaxnb
matchaxnb / sticky.html
Created May 20, 2015 13:31
Sticky note (post-it) w/ Compass
<html>
<body>
<div class="sticky">
<div class="sticky-inside">
<p>My text goes here hey hey hey !<br />
Whatever you may say</p>
<div class="sticky-bottom">
</div>
</div><!-- inside -->
</div><!-- sticky -->
@matchaxnb
matchaxnb / same-height.js
Created May 23, 2015 10:06
Bootstrap row with all cols of same height
jQuery('.row-same-height').each(function(i, j)
{
maxHeight = 0;
jQuery(j).children('[class*="col-"]').each(function(k, l)
{
if (jQuery(l).height() > maxHeight) {
maxHeight = jQuery(l).height();
}
});
jQuery(j).children('[class*="col-"]').each(function(k, l) {
<?php
/**
prestashop-lib — © 2015 Chloé Tigre Rouge <chloe@tigres-rouges.net>
This is licensed under the same terms as Prestashop.
PrestaShop library to create products, categories and all sorts of things
programmatically by passing arrays around
It needs a bootstrapped PrestaShop framework (you can get one by defining
_PS_ROOT_DIR_ and by a
require_once(_PS_ROOT_DIR_.'config/config.inc.php');
@matchaxnb
matchaxnb / JACS.yml
Created June 29, 2015 10:44
Joint Academic Coding System, 3.0, in YAML format
A:
'0':
'0':
'0': {code: A000, label: Medicine & dentistry}
'1':
'0':
'0': {code: A100, label: Pre-clinical medicine}
'2':
'0':
'0': {code: A200, label: Pre-clinical dentistry}
@matchaxnb
matchaxnb / ListOfAcademicSearchEngines.csv
Created June 29, 2015 12:06
List of free access academic search engines and resources in CSV format
AGRICOLA http://agricola.nal.usda.gov/
AGRIS: Agricultural database http://agris.fao.org/agris-search/index.do
Analytical sciences digital library http://home.asdlib.org/
Anthropological Index Online https://aio.therai.org.uk/
Arachne http://arachne.uni-koeln.de/drupal/
Arnetminer https://aminer.org/
arXiv http://arxiv.org/
Astrophysics Data System http://adswww.harvard.edu/
AULIMP: Air University Library's Index to Military Periodicals http://www.dtic.mil/dtic/aulimp/
BASE: Bielefeld Academic Search Engine http://www.base-search.net/
@matchaxnb
matchaxnb / foo.bash
Created August 16, 2015 08:20
/etc/default/keyboard for dvorak & dvorak-intl suppoct, togglisg with caps lock
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="us,us"
XKBVARIANT="dvorak-intl,dvorak"
XKBOPTIONS="grp:caps_toggle"
BACKSPACE="guess"
@matchaxnb
matchaxnb / mount_img.sh
Created September 2, 2015 22:07
Prestashop - mount img folder for CI
#!/bin/sh
BASE_PATH="/srv/www/site"
DEV_PATH="/srv/www/dev.site/img"
STG_PATH="/srv/www/staging.site/img"
PRD_PATH="/srv/www/prod.site/img"
#COMMAND="unionfs-fuse -o cow -o max_files=32768 -o allow_other,use_ino,kernel_cache,suid,uid=999,gid=1001,umask=0022"
COMMAND='sudo mount -t aufs -o br:$BRANCHES none $TARGET'
# first unmount
sudo umount ${DEV_PATH} || echo "not mounted :-)"
#Name = agape
Subnet = 172.27.32.20/32
-----BEGIN RSA PUBLIC KEY-----
MIICCgKCAgEApxt2O0QH7pIFa0lu87GPz0JPmurW46+oi5U9s5NJRpzssieKMLWw
zHdHq+WHITChFaqORo0CYR4YokdQ/8/ZwwU4Q57Z1xX9fZQBJ2/X/UUBrsyf2flm
b3PMu+4p2ZsAHjwAQ0Jrf0IxeeMjsEoIfd+FGTGYL8M8ZWKSiCsNHwgp38wmX8ny
f8yv/mNY25wBfcLBUjmIFXgjjDMHAU7m9MfAbcaJ4G3J3QEi7inmkTi4ffYRxgj0
4a++iIo3t7xvX5QgVSGcCNjNMJyzN+3oBD6se5rtDJ2iivjBy5ZXxLATIGk2fNNL
SYMBePT4g2ZneY2SUhleSV29g939aMmmZ7NAEiqPtrCkMv9YPD/yWS5BScrsIItt