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
.row.no-gutters.attachment_item.my-3{ class: "resource_#{resource.id}", data: { controller: "edit-in-place", "edit-in-place-update-url": resource_path(resource.id), "edit-in-place-resource": "resource" } } | |
.col | |
%input{ type: :hidden, name: "attachment_detail[attachment_id]", value: file.id } | |
%h6 | |
%span{ data: { target: "edit-in-place.input", fieldtype: "text", attr: "name", value: resource.name } } | |
%p | |
%span{ data: { target: "edit-in-place.input", fieldtype: "textarea", attr: "description", value: resource.description } } | |
.col-auto.pull-right | |
.btn-group{ role: "group" } | |
%button.btn.btn-sm{ type: "button", data: { action: "edit-in-place#editMode", target: "edit-in-place.editBtn" } } |
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
--- | |
# INGRESS | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0,::/0 | |
creationTimestamp: 2019-12-30T23:04:50Z | |
generateName: cm-acme-http-solver- |
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
def text_colour(bg_colour) | |
rgb = [bg_colour[0..1], bg_colour[2..3], bg_colour[4..5]].map! do |c| | |
c = c.to_i(16).to_f / 255.0 | |
c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055)**2.4 | |
end | |
(0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]) <= 0.5 ? "fff" : "000" | |
end |
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
# gke_deploy.sh | |
# Make sure we're in the right project and authenticated | |
gcloud config set project your-project | |
# Needed this on first run https://github.com/kubernetes/kubernetes/issues/30617 | |
# gcloud config set container/use_client_certificate True | |
# Regional cheaper than zonal and acceptable for staging | |
gcloud container clusters get-credentials staging \ | |
--zone northamerica-northeast1-a --project your-project |
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
# Modified from https://github.com/ifad/data-confirm-modal/blob/master/vendor/assets/javascripts/data-confirm-modal.js | |
$ -> | |
###* | |
# Builds the markup for a [Bootstrap modal](https://getbootstrap.com/docs/4.0/components/modal/) | |
# for the given `element`. Uses the following `data-` parameters to | |
# customize it: | |
# | |
# * `data-confirm`: Contains the modal body text. HTML is allowed. | |
# Separate multiple paragraphs using \n\n. | |
# * `data-commit`: The 'confirm' button text. "Confirm" by default. |
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
import os, glob, sched, time, sys | |
from w1thermsensor import W1ThermSensor | |
from pymongo import MongoClient | |
from datetime import datetime | |
# Run mongo if it's not already running | |
#mongod | |
# Sensor array | |
sensors_available = W1ThermSensor.get_available_sensors([W1ThermSensor.THERM_SENSOR_DS18B20]) |
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
var acf={ajaxurl:"",admin_url:"",wp_version:"",post_id:0,nonce:"",l10n:null,o:null,helpers:{get_atts:null,version_compare:null,uniqid:null,sortable:null,add_message:null,is_clone_field:null,url_to_object:null},validation:null,conditional_logic:null,media:null,fields:{date_picker:null,color_picker:null,Image:null,file:null,wysiwyg:null,gallery:null,relationship:null}};!function($){acf.helpers.isset=function(){var e=arguments,t=e.length,a=null,n;if(0===t)throw new Error("Empty isset");for(a=e[0],i=1;i<t;i++){if(e[i]===n||a[e[i]]===n)return!1;a=a[e[i]]}return!0},acf.helpers.get_atts=function(e){var t={};return $.each(e[0].attributes,function(e,i){"data-"==i.name.substr(0,5)&&(t[i.name.replace("data-","")]=i.value)}),t},acf.helpers.version_compare=function(e,t){if(typeof e+typeof t!="stringstring")return!1;for(var i=e.split("."),a=t.split("."),n=0,s=Math.max(i.length,a.length);s>n;n++){if(i[n]&&!a[n]&&parseInt(i[n])>0||parseInt(i[n])>parseInt(a[n]))return 1;if(a[n]&&!i[n]&&parseInt(a[n])>0||parseInt(i[n])<parseIn |
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 WP_Query_Geo extends WP_Query { | |
private $lat = NULL; | |
private $lng = NULL; | |
private $distance = NULL; | |
/** | |
* Constructor - adds necessary filters to extend Query hooks | |
*/ | |
public function __construct( $args = array() ) { | |
// Extract Latitude |
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 | |
if ( !defined( 'ABSPATH' ) ) exit; | |
function hashbuddy_activity_hashtags_filter( $content ) { | |
global $bp; | |
$pattern = '/[#]([\p{L}_0-9a-zA-Z-]+)/iu'; | |
// Old line |
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
/* | |
Theme Name: Canvas Child | |
Description: Canvas Child Theme Description | |
Author: Joshua Mark | |
Template: canvas | |
Version: 1.0.0 | |
License: GNU General Public License v2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
Tags: canvas, wddm, cats | |
Text Domain: canvas-child |
NewerOlder