I hereby claim:
- I am joshcanhelp on github.
- I am joshcanhelp (https://keybase.io/joshcanhelp) on keybase.
- I have a public key whose fingerprint is 8703 9194 46F1 49DD 05BA 772E 7E34 CED3 7442 9737
To claim this, I am signing this object:
| /* | |
| * Meta fields for media uploads | |
| */ | |
| /* | |
| * @param array $form_fields | |
| * @param object $post | |
| * | |
| * @return array | |
| */ |
| $blocked = get_option('blacklist_keys'); | |
| $blocked = str_replace( "\r", "\n", $blocked ); | |
| $blocked_arr = explode( "\n", $blocked ); | |
| $blocked_arr = array_map('trim', $blocked_arr); | |
| $final_blocked_arr = array(); | |
| foreach ($blocked_arr as $ip) { | |
| $ip = trim($ip); | |
| if ( filter_var( $ip, FILTER_VALIDATE_IP ) ) { |
| /** | |
| * Redirect on mobile UA | |
| */ | |
| function tenup_mobile_redirect() { | |
| $useragent = $_SERVER['HTTP_USER_AGENT']; | |
| // From http://detectmobilebrowsers.com, set 8/9/2013 | |
| // We're looking for user agents that are associated with mobile devices | |
| if ( preg_match( '/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $useragent ) || preg_match( '/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\ |
| /* | |
| * @param array $form_fields | |
| * @param object $post | |
| * | |
| * @return array | |
| */ | |
| function tenup_attachment_fields_to_edit ( $form_fields, $post ) | |
| { | |
| $form_fields[ "use_as_header_img" ] = array( |
I hereby claim:
To claim this, I am signing this object:
| Running "simplemocha:all" (simplemocha) task | |
| 1..1 | |
| ok 1 Array indexOf() should return -1 when the value is not present | |
| # tests 1 | |
| # pass 1 | |
| # fail 0 | |
| Done, without errors. |
| function Queue() { | |
| this.dataStore = []; | |
| } | |
| Queue.prototype.enqueue = function (element) { | |
| this.dataStore.push(element); | |
| }; | |
| Queue.prototype.dequeue = function () { | |
| return this.dataStore.shift(); |
| var MongoClient = require('mongodb').MongoClient; | |
| MongoClient.connect('mongodb://localhost/m101', function(err, db) { | |
| if (err) { | |
| throw err; | |
| } | |
| var data = db.collection('data'); | |
| var cursor = data.find({}); | |
| cursor.sort("Temperature", -1); |
| // Module dependencies | |
| var express = require('express'), | |
| mysql = require('mysql'); | |
| // Application initialization | |
| var connection = mysql.createConnection({ | |
| host : 'localhost', | |
| user : 'root', |
| /** | |
| * CSS and JavaScript for admin pages | |
| */ | |
| function proper_admin_css_js() { | |
| global $pagenow; | |
| // CSS | |
| wp_enqueue_style( |