Skip to content

Instantly share code, notes, and snippets.

View antoniotrento's full-sized avatar
🎯
Focusing

Antonio Trento antoniotrento

🎯
Focusing
View GitHub Profile
@antoniotrento
antoniotrento / wp2static_v7_wpml.php
Created August 30, 2020 22:24 — forked from stevygee/wp2static_v7_wpml.php
Add WPML translations to WP2Static v7
<?php
function sg_get_translated_posts_urls() {
$default_lang = apply_filters( 'wpml_default_language', NULL );
$ids = get_posts( array(
'fields' => 'ids',
'post_type' => array( 'post', 'page' ),
'numberposts' => -1,
'suppress_filters' => true, // Get posts in all languages
) );

There are two types of markup in Liquid: Output and Tag.

  • Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
  • Tag markup (which cannot resolve to text) is surrounded by
@antoniotrento
antoniotrento / hi-satellite.md
Created July 6, 2020 23:53 — forked from MariadeAnton/hi-satellite.md
Travis CI Demo Examples - GitHub Satellite 2019
@antoniotrento
antoniotrento / sampleREADME.md
Created June 27, 2020 21:40 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@antoniotrento
antoniotrento / wordpress.nginxconf
Created September 19, 2019 11:15 — forked from goblindegook/wordpress.nginxconf
Nginx virtual host configuration for WordPress
server {
listen 80;
server_name www.example.com;
rewrite ^ $scheme://example.com$request_uri?;
}
server {
listen 80;
server_name example.com;
@antoniotrento
antoniotrento / autotumble.py
Created November 19, 2017 09:30 — forked from garcia/autotumble.py
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
# 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 / gist:3bf296f698362840a97038bc43503141
Created March 26, 2017 15:26 — forked from francoishill/gist:6483997
Media queries for mobile devices - Requires at least requires the meta viewport tag with content 'width=device-width'
/*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/
/*At least requires the meta viewport tag with content 'width=device-width'*/
@media only screen and (max-width: 1080px) and (orientation : portrait) {
/* PORTRAIT:
Windows Surface Pro*/
}
@media only screen and (max-width: 800px) and (orientation : portrait) {
/* PORTRAIT:
Acer Iconia Tab A100
@antoniotrento
antoniotrento / LICENSE.txt
Created March 26, 2017 10:33 — forked from sengupta/LICENSE.txt
Email Scraper
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.