Skip to content

Instantly share code, notes, and snippets.

@Averroes
Averroes / Brave_Search_Gogggles.goggle
Last active June 7, 2023 17:24
Brave Search Gogggles
! name: Brave Averroes
! description: Boost My Gist.
! public: false
! author: Averroes
$boost=1,site=github.com
$boost=1,site=hackerone.com
$boost=1,site=bugreader.com
$boost=1,site=portswigger.net
$boost=1,site=vk9-sec.com
@Averroes
Averroes / addPPA_debian.sh
Created February 23, 2017 20:10
add PPA on Debian
wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt
mv add-apt-repository.sh.txt /usr/sbin/add-apt-repository
chmod o+x /usr/sbin/add-apt-repository
chown root:root /usr/sbin/add-apt-repository
@Averroes
Averroes / remove-all-product-categories-tags.php
Created January 16, 2017 10:10 — forked from mikaelz/remove-all-product-categories-tags.php
Remove all WooCommerce product categories and tags
<?php
require dirname(__FILE__).'/wp-blog-header.php';
$wpdb->query("DELETE a,c FROM wp_terms AS a
LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
WHERE c.taxonomy = 'product_tag'");
$wpdb->query("DELETE a,c FROM wp_terms AS a
LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
@Averroes
Averroes / tokenize-example-1.py
Created April 11, 2015 19:47
tokenize example 1
import tokenize
file = open("tokenize-example-1.py")
def handle_token(type, token, (srow, scol), (erow, ecol), line):
print "%d,%d-%d,%d:\t%s\t%s" % \
(srow, scol, erow, ecol, tokenize.tok_name[type], repr(token))
tokenize.tokenize(
file.readline,
@Averroes
Averroes / example.py
Created April 10, 2015 18:16
tokenizing text
# example.py
#
# Example of a tokenizer
import re
from collections import namedtuple
NAME = r'(?P<NAME>[a-zA-Z_][a-zA-Z_0-9]*)'
NUM = r'(?P<NUM>\d+)'
PLUS = r'(?P<PLUS>\+)'
@insin
insin / scraping-101.rst
Last active March 7, 2020 04:10
Scraping 101 (with Scrapy)

Scrapy takes care of the bulk of the work for common steps involved in web scraping so you only need to concentrate on the where and how of retrieving the information you want - it also caches HTTP requests, so you only need to hit the target site once and subsequent re-runs are quick.

Target Site

Tesco's Store Locator

Target URL

http://www.tesco.com/storeLocator/

Determining Store IDs

@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.