Skip to content

Instantly share code, notes, and snippets.

View neilkimmett's full-sized avatar

Neil Kimmett neilkimmett

View GitHub Profile
<?php
/**
* Template for search results.
*
* @package Avada
* @subpackage Templates
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
{
"plus_code" : {
"compound_code" : "G3JQ+2X Pudahuel, Chile",
"global_code" : "47RFG3JQ+2X"
},
"results" : [
{
"address_components" : [
{
"long_name" : "Mina Cuesta Lo Aguirre",
google-api-python-client
google-auth-httplib2
google-auth-oauthlib
python-dotenv
boto3
class Class {
let id: Int
init(id: Int) {
self.id = id
}
}
class Schedule {
let `class`: Class
"images": {
"mobile": {
"1x": "https://res.cloudinary.com/classpass/image/upload/f_auto,q_auto,w_320,c_scale,h_160/hh45owvba8qofnxmwwiq.png",
"2x": "https://res.cloudinary.com/classpass/image/upload/f_auto,q_auto,w_640,c_scale,h_320/hh45owvba8qofnxmwwiq.png",
"3x": "https://res.cloudinary.com/classpass/image/upload/f_auto,q_auto/hh45owvba8qofnxmwwiq.png",
"v1x": "https://res.cloudinary.com/classpass/image/upload/f_auto,q_auto,w_320,c_scale,h_350/zhj0yaeweembxdje2u40.png",
"v2x": "https://res.cloudinary.com/classpass/image/upload/f_auto,q_auto,w_640,c_scale,h_700/zhj0yaeweembxdje2u40.png",
"v3x": "https://res.cloudinary.com/classpass/image/upload/f_auto,q_auto/zhj0yaeweembxdje2u40.png"
},
"default": "https://res.cloudinary.com/classpass/image/upload/f_auto,q_auto/l1smmwfrhf1glaa5rycd.png"
global:
type: color
category: color
props:
colorTeal:
value: "#23cfb9"
deprecated: "Deprecated, use colorBrand"
colorBrand:
value: "#0055ff"
const colors = result
.get('props')
.map(prop => {
const { r, g, b, a } = tinycolor(prop.get('value')).toRgb();;
return ` @objc static let ${prop.get('name')} = #colorLiteral(red: ${parseFloat(r)/255.0}, green: ${parseFloat(g)/255.0}, blue: ${parseFloat(b)/255.0}, alpha: ${parseFloat(a)})`;
});
const colors = result.get('props').map(prop => prop.get('value'))
module.exports = theo => {
theo.registerFormat('ios.color.swift', result => {
const colors = []
return [
'import UIKit',
'',
'extension UIColor {',
...colors,
'}'
].join('\n');
"ios": "theo color.yml - setup setup.js - format ios.color.swift > UIColor+Token.swift"