Skip to content

Instantly share code, notes, and snippets.

View acerspyro's full-sized avatar
💭
Set status

Maxim Therrien acerspyro

💭
Set status
View GitHub Profile
/**
* Resolves a given path relative to the game's home directory
*
* @param relpath
* relpath is a special string that can represent path parameters.
*
* 1. Find all &'s and split the string at that point
* 2. Find <, > and all the text in-between and strips everything from the string
* 3. Find . and .. notations and resolve them
* 4. Loop until no more &'s are found
@acerspyro
acerspyro / wp-bootstrap-pagination-part.php
Created December 30, 2019 20:58
Bootstrap 4 navigation part for WordPress (loosely based on https://gist.github.com/mtx-z/f95af6cc6fb562eb1a1540ca715ed928)
<nav aria-label="pagination">
<?php
global $wp_query;
$entries = paginate_links([
'base' => get_pagenum_link(1) . '%_%',
'format' => '?paged=%#%',
'total' => $wp_query->max_num_pages,
'current' => max( 1, get_query_var('paged') ),
'show_all' => false,
'type' => 'array',
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
ui_settings_tab_active = 0
// Temporary storage area
// Create a nested sidebar on the left of the window.
// Used primarily for the Settings menus.
// usage: uisidebar [
// [tabname tabtooltip]
// ] [tabcontentslist]
// uisidebar 1:[tabname tabtooltip] 2:[tabchildren]
2016-12-19 21:16.41 loading enet..
2016-12-19 21:16.41 loading game..
2016-12-19 21:16.41 identity: acers@BLUETEK v1.5.6-win64-devel client (Elysium Edition) [0x535323ef]
2016-12-19 21:16.41 loading sdl..
2016-12-19 21:16.41 loading video..
2016-12-19 21:16.41 loading gl..
2016-12-19 21:16.41 renderer: GeForce GT 740/PCIe/SSE2 (NVIDIA Corporation)
2016-12-19 21:16.41 driver: 3.3.0 NVIDIA 376.33
2016-12-19 21:16.41 loading sound..
2016-12-19 21:16.41 allocated 32 of 32 sound channels
function swipeLogic() {
sitecanvas.style.transition = "";
$("body")[0].addEventListener('touchstart', function(event) {
touchStartX = parseInt(event.changedTouches[0].clientX);
event.preventDefault();
}, false);
$("body")[0].addEventListener('touchmove', function(event) {
var sitecanvas = document.getElementById("sitecanvas"),
sbwidth = document.getElementById("leftsidebar").offsetWidth,