Skip to content

Instantly share code, notes, and snippets.

View sinebeef's full-sized avatar
💋
hnnnnggggggg

sinebeef sinebeef

💋
hnnnnggggggg
  • London
View GitHub Profile
@sinebeef
sinebeef / cf7-styling-wordpress.php
Created January 21, 2020 13:27
Styles for contact form 7
[text* your-name placeholder "Name"]
[tel* tel-111 placeholder "Telephone"]
[email* your-email placeholder "Email Address"]
[textarea your-message placeholder "Message here"]
[submit "Send"]
}
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="tel"], input[type="number"], textarea, select {
width: 100%;
color: #eee!important;
@sinebeef
sinebeef / blender-cheat-sheet.txt
Last active April 8, 2020 11:14
Blender Cheat Sheet
# Blender 2.79b help me lord!
SHIFT + c : reset curser to grid center
CTRL + . : focus in on selected
p : remove face from model and make it its own.
UNJOIN
p : remove by selected parts (mesh)
@sinebeef
sinebeef / wp-query-ref.php
Created December 9, 2019 15:57 — forked from luetkemj/wp-query-ref.php
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@sinebeef
sinebeef / get-yoast-category-sitemap.py
Created November 28, 2019 17:59
Python script, output list of products / category names for whatever sitemap you provide.
# Lists all the items from either product-sitemap.xml or product_category-sitemap.xml
# you must provide the full url.
from bs4 import BeautifulSoup
import json, requests
import re, sys
url = ""
try:
url = sys.argv[1]
except:
@sinebeef
sinebeef / get-indexed-urls.py
Created November 28, 2019 17:39
Python script for extracting a list of indexed urls from a site:domain result pages
import requests
import csv
from bs4 import BeautifulSoup
#from decimal import *
from decimal import Decimal
product = ['index1.html','index2.html','index3.html']
for prod in product:
@sinebeef
sinebeef / om-black-friday.php
Created November 25, 2019 17:45
Wordpress Footer Banner Black Friday
<?php
/*
Plugin Name: Black Friday Banner
Plugin URI: https://github.com/sinebeef
Description: A really basic black friday or message banner made upon request.
Author: sine
Version: 0.1
Author URI: https://github.com/sinebeef
*/
@sinebeef
sinebeef / python-cheat-sheet.py
Last active December 3, 2019 18:03
A python 3 cheat sheet, because my brain is like a sieve
# merge list
string = "I said a hib hubbit"
list = []
list.extend(string.split())
# replace with diction key values:
inch_to_mm = {
'3/8"' : '10mm',
'1/2"' : '12mm',
'5/16"': '8mm',
@sinebeef
sinebeef / .htaccess
Last active July 3, 2020 22:56
htaccess for blocking and stuff
# SSL FORCE
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
# Block search bots
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} AltaVista [OR]
@sinebeef
sinebeef / ffmpeg-cheat-sheet.txt
Created July 19, 2019 19:59
ffmpeg cheat sheet
# for when using raw rgb data which is picky with players (safe)
ffmpeg -i raw_from_aae.avi -pix_fmt yuv420p output.mp4
@sinebeef
sinebeef / jquery-cheat-sheet.js
Created June 12, 2019 16:51
jQuery Cheat Sheet
(function ($) {
$(document).ready(function () {
console.log("ready!");
$('.left').on("click", function (e) {
e.preventDefault();
console.log('moo');
});
});
})(jQuery);