Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View wGEric's full-sized avatar

Eric Faerber wGEric

  • Salt Lake City, Utah
View GitHub Profile
@wGEric
wGEric / Pagination
Last active September 27, 2015 03:57
Pagination class. Was written for a specific system so it could/should be updated to use a constructor instead of setVars or switched to static methods
<?php
class Pagination {
private $total_items = 0;
private $current_number = 0;
private $per_page = 25;
/**
* sets up the variables
*/
public function setVars($total, $current = 0, $per_page = 25) {
@wGEric
wGEric / gist:1350388
Created November 9, 2011 04:31
phpBB AJAX as jQuery Plugin
// setup global config variable
if (!phpbb)
{
var phpbb = {};
}
phpbb.alert_fade_time = 100;
(function($, window, document) {
var overlay, // overlay overlay for alerts
</div>
<div id="page-footer">
<div class="navbar">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="linklist">
<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a></li>
<!-- IF not S_IS_BOT -->
@wGEric
wGEric / plugin.js
Created January 11, 2012 17:48
CKEditor plugin that uses https://github.com/wGEric/phpBB-BBCode-Javascript-Parser to process the data
(function() {
var BBCodeWriter = function(editor) {
this.editor = editor;
this.writer = new CKEDITOR.htmlWriter();
this.dataFilter = new CKEDITOR.htmlParser.filter();
this.htmlFilter = new CKEDITOR.htmlParser.filter();
}
@wGEric
wGEric / README.md
Last active August 29, 2015 13:57 — forked from omailson/README.md
Linux, Rdio and media buttons

I like Rdio and linux. Rdio works great in a browser except for one thing: keyboard shortcuts!!!

When coding, I like to be able to play/pause my music quickly, meaning I don't want to switch windows. I figured out a way to do this:

Google Chrome App

First, I created a shortcut to the app from Google Chrome. Right click on the app and create the shortcut.

xdotool