Skip to content

Instantly share code, notes, and snippets.

View eon01's full-sized avatar
🎯
Focusing

Aymen EL Amri eon01

🎯
Focusing
View GitHub Profile
DELETE p FROM wp_posts p WHERE p.post_type = 'product';
DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
DELETE tr FROM wp_term_relationships tr INNER JOIN wp_term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE tt.taxonomy != 'link_category' AND tr.object_id NOT IN ( SELECT ID FROM wp_posts );
deb http://mirror.cse.iitk.ac.in/debian/ jessie main
deb-src http://mirror.cse.iitk.ac.in/debian/ jessie main
deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib
# wheezy-updates, previously known as 'volatile'
deb http://mirror.cse.iitk.ac.in/debian/ jessie-updates main contrib
deb-src http://mirror.cse.iitk.ac.in/debian/ jessie-updates main contrib
@eon01
eon01 / countries.json
Last active August 29, 2015 14:04 — forked from keeguon/countries.json
Countries JSON
[
{"name": "Afghanistan", "code": "AF"},
{"name": "Åland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"},
{"name": "AndorrA", "code": "AD"},
{"name": "Angola", "code": "AO"},
{"name": "Anguilla", "code": "AI"},
{"name": "Antarctica", "code": "AQ"},
@eon01
eon01 / countries.xml
Created July 28, 2014 21:44
Countries XML
<?xml version="1.0" encoding="UTF-8"?>
<root>
<element>
<code>AF</code>
<name>Afghanistan</name>
</element>
<element>
<code>AX</code>
<name>Åland Islands</name>
</element>
@eon01
eon01 / dostour.py
Created January 12, 2014 08:12
Scrap the tunisian constitution articles and save them to seperate CSV files in function of chapters.
#!/usr/bin/python
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import urllib2
__author__ = "Aymen Amri"
__email__ = "[email protected]"