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 | |
/** | |
* Class dtbaker_Shortcode_Line | |
* handles the creation of [boutique_line] shortcode | |
* adds a button in MCE editor allowing easy creation of shortcode | |
* creates a wordpress view representing this shortcode in the editor | |
* edit/delete button on wp view as well makes for easy shortcode managements. | |
* Author: dtbaker@gmail.com | |
* Copyright 2014 |
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
# by Paul Callaghan, Nov 2010. | |
# this uses method-missing to trigger generation and execution of the corresponding relation | |
# eg Product.name_equals("yay") | |
# TODO: M_S doesn't check for unexpected values, eg match failures in | |
# matches_attribute_method (so we trap exceptions) | |
module MetaSearchHacks | |
def self.build_rel(base_or_scope, method, *args) |
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 AddDeviseColumnsToUser < ActiveRecord::Migration | |
def self.up | |
change_table :users do |t| | |
#if you already have a email column comment the below line | |
t.database_authenticatable | |
t.confirmable | |
t.recoverable | |
t.rememberable | |
t.trackable | |
t.string :encrypted_password, :limit => 128 |
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
// Disqus Tracking | |
/* | |
Put <div id="disqus_thread"></div> above | |
*/ | |
var disqus_shortname = 'yourfuckingpollingplace'; // required: replace example with your forum shortname | |
function track_disqus(comment) { | |
_gaq.push(['_trackEvent', 'Disqus', 'Comment', document.title]); | |
}; |
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
#!/usr/bin/python | |
import base64 | |
import plistlib | |
import errno | |
import os | |
def mkdir_p(path): | |
try: | |
os.makedirs(path) |
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
Show hidden characters
{ | |
"requireSpacesInConditionalExpression": true, | |
"requireSpacesInFunction": { | |
"beforeOpeningCurlyBrace": true | |
}, | |
"disallowSpacesInFunction": { | |
"beforeOpeningRoundBrace": true | |
}, | |
"requireMultipleVarDecl": "onevar", | |
"requireSpacesInsideObjectBrackets": "all", |
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
/** | |
* IntesisHome Connect | |
* | |
* Author: ERS | |
* based off device work by Martin Blomgren | |
* Last update: 2019-12-14 | |
* | |
* Licensed under the Apache License, Version 2.0 (the 'License'); you may not | |
* use this file except in compliance with the License. You may obtain a copy | |
* of the License at: |
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
/*! | |
* jQuery pub/sub plugin by Peter Higgins | |
* https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js | |
* | |
* Modified by Tobin Bradley | |
* | |
* AFL/BSD Licensed | |
*/ | |
;(function(d){ | |
// the topic/subscription hash |
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
#!/usr/bin/php | |
<?php | |
echo "\nRunning php linter...\n"; | |
$params = explode(' ', file_get_contents('php://stdin')); | |
$ref = trim($params[1]); | |
$diff = array(); | |
$return = 0; |
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
/** | |
* The code below renders additional custom attachment fields into the | |
* new media manager. | |
* | |
* I am assuming you are using your own custom media modal frame. By | |
* extending the default Attachment.Details subview, we can append our | |
* custom fields to the default fields listed. | |
* | |
* In the initialize function, we ensure that our changes are always up | |
* to date by "listening" to our model's change event and updating the |
OlderNewer