This is now an actual repo:
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
<?php | |
/** | |
* BITWISE FLAGS for Custom PHP Objects | |
* | |
* @link http://php.net/manual/en/language.operators.bitwise.php#108679 | |
* | |
* Sometimes I need a custom PHP Object that holds several boolean TRUE or FALSE values. | |
* I could easily include a variable for each of them, but as always, code has a way to | |
* get unweildy pretty fast. A more intelligent approach always seems to be the answer, |
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
namespace :init do | |
task 'gitflow_init' do | |
preconditions = [ | |
%{git config --get gitflow.branch.master >/dev/null 2>&1}, | |
%{git config --get gitflow.branch.develop >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.feature >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.release >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.hotfix >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.support >/dev/null 2>&1}, | |
%{git config --get gitflow.prefix.versiontag >/dev/null 2>&1} |
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
# How Clearance / Hoptoad does it | |
module Clearance | |
class << self | |
attr_accessor :configuration | |
end | |
def self.configure | |
self.configuration ||= Configuration.new | |
yield(configuration) | |
end |
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
diff --git a/content/themes/roots/lib/vendor/wpalchemy/MetaBox.php b/content/themes/roots/lib/vendor/wpalchemy/MetaBox.php | |
index 7309489..d081801 100644 | |
--- a/content/themes/roots/lib/vendor/wpalchemy/MetaBox.php | |
+++ b/content/themes/roots/lib/vendor/wpalchemy/MetaBox.php | |
@@ -1331,7 +1331,7 @@ class WPAlchemy_MetaBox | |
// filter: output (can_output) | |
if ($this->has_filter('output')) | |
{ | |
- $can_output = $this->apply_filters('output', $post_id); | |
+ $can_output = $this->apply_filters('output', array($post_id, $can_output, $this)); |
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
if ( ! function_exists( 'convert_meta_storage' ) ) : | |
function convert_meta_storage($key, $prefix, $posttype) { | |
$args = array( | |
'numberposts' => -1, | |
'post_type' => $posttype, | |
); | |
$items = get_posts($args); |
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
jQuery(document).ready(function($){ | |
// Configure | |
var config = { | |
// Overwrite default settings | |
wpmedia: { |
This is just a simple loading animation made of 10 p tags. I call it "Pulse"
A Pen by A Non Ymous on CodePen.
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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
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
<?php | |
// client side: assume user has maliciously used the following values in a form search input field and submitted | |
$field = '<input type="text" name="query" value="%slow_your_db" />'; | |
// server-side: assume retrieval of form search input value | |
$search_term = !empty($_GET['query']) ? $_GET['query'] : NULL; | |
// try to escape the input before querying, but we fail to escape the qualifier | |
// and it remains "%slow_your_db" | |
$search_term = mysql_real_escape_string($search_term); |
NewerOlder