Skip to content

Instantly share code, notes, and snippets.

View antoniotrento's full-sized avatar
🎯
Focusing

Antonio Trento antoniotrento

🎯
Focusing
View GitHub Profile
# Patches Jekyll's built-in pagination to work with files *other* than the base index.html.
# Expects the following to be specified in your _config.yml:
#
# paginate_base: "blog" # Puts all pagination folders in the "blog" dir, e.g. "/blog/page2"
# paginate_index: "blog/index.html" # Paginates using the specified file
module Jekyll
class Page
@antoniotrento
antoniotrento / mediaqueries.css
Created February 20, 2017 09:39 — forked from needim/mediaqueries.css
Device Specific CSS Media Queries Collection
/*
Based on:
1. http://stephen.io/mediaqueries
2. https://css-tricks.com/snippets/css/media-queries-for-standard-devices/
*/
/* iPhone 6 in portrait & landscape */
@media only screen
and (min-device-width : 375px)
and (max-device-width : 667px) {
@antoniotrento
antoniotrento / CSS3 Media Queries Template
Created November 24, 2015 03:03
CSS3 Media Queries template
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
@escopecz
escopecz / commands.php
Last active April 18, 2023 22:43 — forked from alanhartless/cron.php
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMauticReallyIDo'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
@needim
needim / mediaqueries.css
Last active April 4, 2024 23:23
Device Specific CSS Media Queries Collection
/*
Based on:
1. http://stephen.io/mediaqueries
2. https://css-tricks.com/snippets/css/media-queries-for-standard-devices/
*/
/* iPhone X in portrait & landscape */
@media only screen
and (min-device-width : 375px)
and (max-device-width : 812px)
@KhepryQuixote
KhepryQuixote / PyTorStemPrivoxy.md
Last active September 9, 2023 20:36
Python script to connect to Tor via Stem and Privoxy, requesting a new connection (hence a new IP as well) as desired.

Crawling Anonymously with Tor in Python

adapted from the article "Crawling anonymously with Tor in Python" by S. Acharya, Nov 2, 2013.

The most common use-case is to be able to hide one's identity using TOR or being able to change identities programmatically, for example when you are crawling a website like Google and you don’t want to be rate-limited or blocked via IP address.

Tor

Install Tor.

@dideler
dideler / example.md
Last active February 17, 2024 20:24
A python script for extracting email addresses from text files.You can pass it multiple files. It prints the email addresses to stdout, one address per line.For ease of use, remove the .py extension and place it in your $PATH (e.g. /usr/local/bin/) to run it like a built-in command.

The program below can take one or more plain text files as input. It works with python2 and python3.

Let's say we have two files that may contain email addresses:

  1. file_a.txt
foo bar
ok ideler.dennis@gmail.com sup
 hey...user+123@example.com,wyd
hello world!
@garcia
garcia / autotumble.py
Last active February 9, 2018 15:16
Automatically follow Tumblr users who post in the #follow-back tag and reblog posts from the Dashboard. Requires python-oauth2, a Tumblr blog, a Tumblr appication's consumer key/secret pair, and an authentication key/secret pair for the blog / application. Potentially useful for future social engineering escapades.
#!/usr/bin/env python
import itertools
import json
import logging
import sys
import time
import traceback
# oauth2 is available at https://github.com/simplegeo/python-oauth2
import oauth2
@markjaquith
markjaquith / gist:4487609
Created January 8, 2013 20:25
WordPress ASCII art.
<!--
`-/+osssssssssssso+/-`
./oys+:.` `.:+syo/.
.+ys:. .:/osyyhhhhyyso/:. ./sy+.
/ys: -+ydmmmmmmmmmmmmmmmmmmdy+- :sy/
/h+` -odmmmmmmmmmmmmmmmmmmmmmmmmmmdo- `+h/
:ho` /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmds/ `oh:
`sy. /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd+ .ys`
.ho `sdddhhhyhmmmdyyhhhdddddhhhyydmmmmy oh.