Quick guide on printing pretty dates in Rails
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
setInterval(function(){ | |
botao = jQuery('#smush-box-meta-boxes-bulk > div.sui-box-body > div.wp-smush-bulk-wrapper > button'); | |
if( botao.attr('disabled') != 'disabled' ) { | |
botao.trigger('click'); | |
} | |
}, 1000); |
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 | |
54 results - 15 files | |
web/app/plugins/woocommerce-xero/includes/class-wc-xr-address.php: | |
20 public function get_type() { | |
21: return apply_filters( 'woocommerce_xero_address_type', $this->type, $this ); | |
22 } | |
34 public function get_line_1() { |
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
{"0":{"title":"Vimeo Upload","description":"","labelPlacement":"top_label","descriptionPlacement":"below","button":{"type":"text","text":"Submit","imageUrl":""},"fields":[{"type":"dgv_vimeo_upload","id":2,"label":"Video","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"allowedExtensions":"mp4,mov,wmv,avi,flv","formId":1,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","choices":"","conditionalLogic":"","maxFileSize":"","maxFiles":"","multipleFiles":false,"productField":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"fields":"","displayOnly":""},{"type":"text","id":3,"label":"Course ID","adminLabel":"","isRequi |
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
<html> | |
<!-- Navbar | |
================================================== --> | |
<div class="bs-docs-section clearfix"> | |
<div class="row"> | |
<div class="col-lg-12"> | |
<div class="page-header"> | |
<h1 id="navbars">Navbars</h1> | |
</div> |
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
#!/bin/bash | |
# This script will automatically set up a single node Flynn Cluster on your linux box | |
# Fresh Flynn install with domain provided by the xip.io service | |
# Tested with Base Image: Ubuntu 14.04 x64 @ DigitalOcean droplet | |
# @date 16 Nov 2015 | |
# @author Edu Wass (eduwass at gmail com) | |
echo '---- START SETUP ----' |
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
[ | |
{ "keys": ["´"], "command": "insert", "args": {"characters": "{"} }, | |
{ "keys": ["ç"], "command": "insert", "args": {"characters": "}"} }, | |
{ "keys": ["`"], "command": "insert", "args": {"characters": "["} }, | |
{ "keys": ["+"], "command": "insert", "args": {"characters": "]"} } | |
] |
git archive
will accept paths as arguments. All you should need to do is:
git archive -o ../latest.zip some-commit $(git diff --name-only earlier-commit some-commit)
or if you have files with spaces (or other special characters) in them, use xargs:
git diff --name-only earlier-commit some-commit | xargs -d'\n' git archive -o ../latest.zip some-commit
If you don't have xargs properly installed, you could cook up an alternative:
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 FitmetrixAPI{ | |
private $base_url; | |
private $encoded_auth; | |
private $facility_location_id; | |
public function __construct($token, $token_key, $facility_location_id){ | |
$this->base_url = 'https://api.fitmetrix.io/api/'; |
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
// Define which products we should hide the subscription text for | |
function should_hide_subscription_text($product){ | |
$is_subscription = (get_class($product) == 'WC_Product_Variable_Subscription'); | |
$has_price = (intval($product->subscription_price)>0); | |
$has_fee = (intval($product->subscription_sign_up_fee)>0); | |
if($is_subscription && $has_price && !$has_fee){ | |
return true; | |
} else { | |
return false; | |
} |