Skip to content

Instantly share code, notes, and snippets.

View porkcharsui's full-sized avatar

Derek Ellis porkcharsui

View GitHub Profile
@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

@nathansmith
nathansmith / moz-webkit.css
Created March 22, 2011 01:51
Target Firefox and WebKit via hacky CSS.
/*
Read more here:
https://developer.mozilla.org/en/CSS/@-moz-document
For more browser-specific hacks:
http://paulirish.com/2009/browser-specific-css-hacks
*/
@-moz-document url-prefix() {
/* Put your Firefox specific code here. */
@tiqtech
tiqtech / node-facebook-auth
Created April 19, 2011 03:27
Port of server-side Facebook authentication example
var url = require("url");
var express = require('express');
var https = require("https");
var server = express.createServer();
function getContent(options, callback) {
var req = https.request(options, function(res) {
var body = "";
res.on('data', function (chunk) {
body += chunk;
@benatkin
benatkin / hello.js
Created April 24, 2011 08:16
http/https server with node + express + ufw
// I edited this using the ACE editor bookmarklet
// http://ajaxorg.github.com/ace/build/textarea/editor.html
var express = require('express'),
fs = require('fs');
var app = express.createServer({
key: fs.readFileSync('positive.key'),
cert: fs.readFileSync('positive.pem'),
ca: fs.readFileSync('positive-chain.crt')
});
@devongovett
devongovett / gist:1468024
Created December 12, 2011 16:05
Aurora.js Ideas

Ideas for Aurora.js

Aurora.js is a JavaScript/CoffeeScript media framework that makes implementing audio formats, both containers and codecs much easier. Here are a few things it has:

  1. Sources (HTTP, streaming, File API, etc.)
  2. Shared Code (buffers, queues, bitstreams, etc.)
  3. Containers (demuxers)
  4. Codecs (decoders)
  5. Sink.js
@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active October 12, 2025 16:23
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@prasincs
prasincs / foscam_docs.md
Last active June 10, 2023 08:54
FOSCAM Documentation

Adapted from http://www.digitalham.co.uk/web/development/embedding-cctv/ipcam-cgi-sdk/

AFAIK, everything is based on the CGI scripts below, there might be ways to get the streams but I believe it's doable without hacking the firmware and stuff. All functions should be accessible via GET and POST methods.

ACL groups:visitor、operator and Administrator.

Upgrade_firmware.cgi and upgrade_htmls.cgi only support post method,others cgi only support get method.

next_url:

@jshaw
jshaw / byobuCommands
Last active November 14, 2025 07:25
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@geek
geek / install.md
Last active December 1, 2020 12:30
Installing and running SmartOS on OSX with VirtualBox
@willurd
willurd / web-servers.md
Last active November 18, 2025 14:46
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000