This file contains 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
/* | |
* twitter-entities.js | |
* This function converts a tweet with "entity" metadata | |
* from plain text to linkified HTML. | |
* | |
* See the documentation here: http://dev.twitter.com/pages/tweet_entities | |
* Basically, add ?include_entities=true to your timeline call | |
* | |
* Copyright 2010, Wade Simmons | |
* Licensed under the MIT license |
This file contains 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
<?php | |
/** | |
Validate an email address. | |
Provide email address (raw input) | |
Returns true if the email address has the email | |
address format and the domain exists. | |
*/ | |
function check_email_valid($email){ | |
$isValid = true; |
This file contains 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
<?php function sanitize_page($buffer) { | |
$search = array('/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s'); | |
$replace = array('>', '<', '\\1'); | |
$buffer = preg_replace($search, $replace, $buffer); | |
function gzip_doc($buffer) { if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { return ob_gzhandler($buffer, 5); } else { return $buffer; }} | |
return gzip_doc($buffer); | |
} ?> |
This file contains 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
.class-name { | |
// styles for the parent class first. | |
font-size:20px; | |
margin-left:15px; | |
padding:20px 5px; | |
font-family: 'Lato', sans-serif; | |
background-color:#333; | |
// styles for html elements before any child classes. | |
ul { |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
.dropdown { | |
background-imager: linear-gradient(50deg, #757575 0, #6f6f6f 20%, transparent 69%); | |
background-color:#999; | |
} |
This file contains 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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName joshuakme.dev | |
DocumentRoot /var/www/joshuak | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> | |
<Directory /var/www/joshuak> | |
Options Indexes FollowSymLinks MultiViews |
This file contains 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
<div class="terminal-window"> | |
<div class="navbar"> | |
<div class="action close"><div class="circle"></div></div> | |
<div class="action min"><div class="circle"></div></div> | |
<div class="action full"><div class="circle"></div></div> | |
</div> | |
<div class="terminal"> | |
<p class="login">Last login: Thu Oct 23 11:31:12 on ttys000</p> | |
<p class="user"> | |
<span class="username">joshkidd</span> <span>at</span> <span class="sys">Mac-mini</span> <span>in</span> <span class="dir">~</span> |
This file contains 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
<?php | |
function extend_customizer() { | |
global $wp_customize; | |
// Add Panel | |
$wp_customize->add_panel('example', array( | |
'title' => 'Example Panel', | |
'description' => 'Description', | |
'priority' => 80 |
This file contains 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
if(Meteor.isServer()) { | |
Meteor.methods({ | |
postTweet: function() { | |
Twitter = new TwitMaker({ | |
consumer_key: Meteor.settings.twitterKey, | |
consumer_secret: Meteor.settings.twitterSecret, | |
access_token: Meteor.user().services.twitter.accessToken, | |
access_token_secret: Meteor.user().services.twitter.accessTokenSecret |
OlderNewer