This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to https://github.com/daveross/http2-server-push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/rc.local | |
`lsusb -d 16d0:0504 | sed "s/Bus /chmod o+w \/dev\/bus\/usb\//" | sed "s/ Device /\//" | cut -d ":" -f 1` | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script> | |
window.addEventListener('DOMContentLoaded', function() { | |
// Assume hacked_string started off as something completely fine, but a third-party script changed its value so now it looks like... | |
var hacked_string = "\"\>\<script\>alert(\"haxx0r3d\")\<\/script\>"; | |
// Use the DOM API to build a node. Use hacked_string as its id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Last updated: 2014-12-08 | |
A Responsive Web Design Podcast | |
Boagworld Web Show | |
On the Grid | |
Word-Break Show | |
The Web Ahead | |
Debug | |
Polygamer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((function ($) { | |
$.scrollWindowTo = function (pos, duration, cb) { | |
if (duration == null) { | |
duration = 0; | |
} | |
if (pos === $(window).scrollTop()) { | |
$(window).trigger('scroll'); | |
if (typeof cb === "function") { | |
cb(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"label":"Text field label", | |
"field_type":"text", | |
"required":true, | |
"field_options":{ | |
"size":"small", | |
"description":"Text field description", | |
"minlength":"1", | |
"maxlength":"100" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'gettext', 'change_lost_pw_link', 30, 2 ); | |
/** | |
* Override translations | |
* | |
* @param string $translated Translated string | |
* @param string $untranslated Untranslated string | |
* | |
* @return string translated string | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# (not really -- run these commands by hand & pay attention to the comments) | |
# Homebrew: The missing package manager for OS X | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
# Fish: Finally, a command line shell for the 90s | |
brew install fish | |
# Git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write the data from the current session to the data storage system. | |
*/ | |
public function write_data() { | |
$option_key = "_wp_session_{$this->session_id}"; | |
// Only write the collection to the DB if it's changed. | |
$this->recursive_dirty_check( $this ); | |
if ( $this->dirty ) { | |
if ( false === get_option( $option_key ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// There should be an "ajaxurl" variable set that you can use instead of hard-coding the url here | |
jQuery.get('/wp-admin/admin-ajax.php', {'action': 'this_sucks', 'postid': '1234'}, function(data, status, jqXHR) { | |
// Display post here | |
}); |