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 / regenerate-images.php
Created May 20, 2015 14:56
Regenerate images in Prestashop from command line
<?php
define('_PS_ROOT_DIR_', '/path/to/prestashop/root');
define('_PS_ADMIN_DIR_', _PS_ROOT_DIR_.'admin_folder');
require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
require(_PS_ADMIN_DIR_.'/functions.php');
class Employee2 extends EmployeeCore
{
public function isSuperAdmin()
@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 / prestashop-lib.php
Created May 28, 2015 18:22
Library to manipulate Prestashop from scripts
<?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"