Skip to content

Instantly share code, notes, and snippets.

#/usr/bin/env bash
# Install some pacakages we'll need to compile the driver below.
sudo dnf install gcc kernel-devel -y
# Create working dir for Broadcom driver files and patches.
mkdir hybrid_wl_f23
# Change to working dir.
cd hybrid_wl_f23
@onpubcom
onpubcom / onpub-menu.css
Created February 19, 2012 15:53
Android Design inspired CSS for Onpub frontend drop-down menus.
/* Onpub (TM)
* Copyright (C) 20112 Onpub.com <http://onpub.com/>
* Author: Corey H.M. Taylor <corey@onpub.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2.
*/
/* Android Design inspired CSS for Onpub frontend drop-down menus.
@onpubcom
onpubcom / onpub.css
Created February 19, 2012 15:51
Android Design inspired CSS for Onpub frontends.
/* Onpub (TM)
* Copyright (C) 2012 Onpub.com <http://onpub.com/>
* Author: Corey H.M. Taylor <corey@onpub.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2.
*/
/* Android Design inspired CSS for Onpub frontends.
@onpubcom
onpubcom / onpubcom_array_date_sort.js
Created February 8, 2012 20:15
How to Sort an Array of Dates with JavaScript
<script type="text/javascript">
// First let's create an array of JavaScript Date
// objects.
// More info about the Date class:
// http://w3schools.com/js/js_obj_date.asp
var dates = [
new Date(2010, 4, 10, 10, 07, 16),
new Date(2010, 4, 8, 9, 16, 09),
new Date(2010, 3, 30, 0, 15, 49),
<?php
include 'onpub/api/onpubapi.php';
// Establish the connection to the Onpub database.
$pdo = new PDO("mysql:host=localhost;dbname=test", "test", "test");
$oArticles = new OnpubArticles($pdo);
$qo = new OnpubQueryOptions();
<?php
// Establish the connection to the Onpub database.
$pdo = new PDO( "mysql:host=localhost;dbname=test", "test", "test" );
// Include the OnpubAPI classes.
include 'onpub/api/onpubapi.php';
// Construct an OnpubArticles object. This represents the OnpubArticles table
// in the database.
<?php
// See the following OnpubAPI tutorial for more info:
// http://onpubco.com/index.php?articleID=78&sectionID=2
// This example is based on an example by Anis uddin Ahmad, the author of
// Universal Feed Writer.
// Include the required classes.
include 'FeedWriter.php';
<?php
/* To run this tutorial on your own system, save this file as
* onpubarticles_tutorial.php in a directory where Onpub is installed (or
* adjust the include path below), then on a command line type:
* php onpubarticles_tutorial.php
*/
/* Include the OnpubAPI classes.
* Assumes Onpub is installed in the same directory as this file.
<?php
// See the following OnpubAPI tutorial for more info:
// http://onpubco.com/index.php?articleID=76&sectionID=2
// Establish the connection to the Onpub database.
$pdo = new PDO( "mysql:host=localhost;dbname=test", "test", "test" );
// Include the OnpubAPI classes.
include 'onpub/api/onpubapi.php';
<?php
// Include the Onpub API files.
include 'onpub/api/onpubapi.php';
try {
// Connect to the Onpub database.
// Replace host, dbname, username, and password with your own DB connection
// info.
$pdo = new PDO( "mysql:host=localhost;dbname=test", "test", "test" );