CRUD = Create, Read, Update, Delete
$host = '127.0.0.1';
$dbname = 'test';
$username = 'root';
# Apache configuration file | |
# httpd.apache.org/docs/2.2/mod/quickreference.html | |
# Note .htaccess files are an overhead, this logic should be in your Apache | |
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html | |
# Techniques in here adapted from all over, including: | |
# Kroc Camen: camendesign.com/.htaccess | |
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
# Sample .htaccess file of CMS MODx: modxcms.com | |
# This is the free sample of .htaccess from 6GO s.r.l. | |
# @author Claudio Ludovico Panetta (@Ludo237) |
<?php get_header(); ?> | |
<div id="content"> | |
<div id="inner-content" class="row"> | |
<main id="main" class="large-8 medium-8 columns" role="main"> | |
<ul class="accordion" data-accordion role="tablist"> | |
# One liner for counting unique IP addresses from nginx logs | |
# Feel free to comment with better ideas - I'm sure it's not the best way of doing this (I'm no awk ninja!) | |
# | |
# Sample output: | |
# | |
# $ cat example.com.access.log | awk -F " " '{a[$1]++ } END { for (b in a) { print b, "\t", a[b] } }' | |
# 66.65.145.220 49 | |
# 92.63.28.68 126 | |
cat example.com.access.log | awk -F " " '{a[$1]++ } END { for (b in a) { print b, "\t", a[b] } }' |
<?php | |
/* | |
* Script: DataTables server-side script for PHP and MySQL | |
* Copyright: 2012 - John Becker, Beckersoft, Inc. | |
* Copyright: 2010 - Allan Jardine | |
* License: GPL v2 or BSD (3-point) | |
*/ | |
class TableData { |
<?php | |
/** | |
* Recursively implodes an array with optional key inclusion | |
* | |
* Example of $include_keys output: key, value, key, value, key, value | |
* | |
* @access public | |
* @param array $array multi-dimensional array to recursively implode | |
* @param string $glue value that glues elements together |
<?php | |
/* | |
* DatabaseUtils.php - A class of simple database utilities. | |
* | |
* Performs CRUD operations using PDO (MySQL) prepared statements. | |
* | |
* Author: bencentra (https://gist.github.com/bencentra/92228e1f4139436c4153) | |
*/ |
<?php | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |
<?php | |
/* | |
Parameter Example | |
$data = array('post_id'=>'12345','post_title'=>'A Blog post'); | |
$target = 'single tocken id or topic name'; | |
or | |
$target = array('token1','token2','...'); // up to 1000 in one request | |
*/ | |
public function sendMessage($data,$target){ | |
//FCM api URL |
* Downloaded or downloading | |
============================= | |
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html | |
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html | |
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html | |
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html | |
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html | |
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html | |
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html |