Skip to content

Instantly share code, notes, and snippets.

View Gataquadrada's full-sized avatar
🍅
EATING TOMATOES!

GataQuadrada Gataquadrada

🍅
EATING TOMATOES!
View GitHub Profile
@dbspringer
dbspringer / some_plugin.php
Created January 28, 2014 01:56
WordPress front-end uploader & current-user only media filter
<?php
class Some_WP_Plugin {
/**
* Init everything here
*/
public function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_filter( 'ajax_query_attachments_args', array( $this, 'filter_media' ) );
@ebidel
ebidel / handle_file_upload.php
Created April 18, 2012 03:23
Uploading files using xhr.send(FormData) to PHP server
<?php
$fileName = $_FILES['afile']['name'];
$fileType = $_FILES['afile']['type'];
$fileContent = file_get_contents($_FILES['afile']['tmp_name']);
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent);
$json = json_encode(array(
'name' => $fileName,
'type' => $fileType,
'dataUrl' => $dataUrl,
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">