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
#' Get sunrise and sunset time for any location and date from sunsetsunrise.io API | |
#' | |
#' @param lon longitude in decimal degree of the location | |
#' @param lat latitude in decimal degree of the location | |
#' @param date a date string in 'yyy-mm-dd' format. | |
#' | |
#' @return a tibble with sunset/sunrise time, day length, location timezone and date | |
#' @export | |
#' | |
#' @examples |
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
@media (prefers-color-scheme: dark) { | |
:root { | |
--contrast: #fff; | |
--contrast-2: #000; | |
--contrast-3: #000; | |
--base: #1e1e1e; | |
--base-2: #212121; | |
--base-3: #212121; | |
--accent: #1e90ff; | |
--global-color-8: rgba(180, 180, 191, 0.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
/* https://go.tacodewolff.nl/minify */ | |
enScroll=!1,enFdl=!1,extCurrent=void 0,filename=void 0,targetText=void 0,splitOrigin=void 0;const lStor=localStorage,sStor=sessionStorage,doc=document,docEl=document.documentElement,docBody=document.body,docLoc=document.location,w=window,s=screen,nav=navigator||{},extensions=["pdf","xls","xlsx","doc","docx","txt","rtf","csv","exe","key","pps","ppt","pptx","7z","pkg","rar","gz","zip","avi","mov","mp4","mpe","mpeg","wmv","mid","midi","mp3","wav","wma"];function a(e,t,n,o){const j="G-XXXXXXXXXX",r=()=>Math.floor(Math.random()*1e9)+1,c=()=>Math.floor(Date.now()/1e3),F=()=>(sStor._p||(sStor._p=r()),sStor._p),E=()=>r()+"."+c(),_=()=>(lStor.cid_v4||(lStor.cid_v4=E()),lStor.cid_v4),m=lStor.getItem("cid_v4"),v=()=>m?void 0:enScroll==!0?void 0:"1",p=()=>(sStor.sid||(sStor.sid=c()),sStor.sid),O=()=>{if(!sStor._ss)return sStor._ss="1",sStor._ss;if(sStor.getItem("_ss")=="1")return void 0},a="1",g=()=>{if(sStor.sct)if(enScroll==!0)return sStor.sct;else x=+sStor.getItem("sct")+ +a,sSto |
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
(function (context, trackingId, options) { | |
const history = context.history; | |
const doc = document; | |
const nav = navigator || {}; | |
const storage = localStorage; | |
const encode = encodeURIComponent; | |
const pushState = history.pushState; | |
const typeException = 'exception'; | |
const generateId = () => Math.random().toString(36); | |
const getId = () => { |
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
const crypto = require('crypto'); | |
function createSha256CspHash(content) { | |
return 'sha256-' + crypto.createHash('sha256').update(content).digest('base64'); | |
} |
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 | |
add_action('admin_init', 'gpm_add_meta_boxes', 2); | |
function gpm_add_meta_boxes() { | |
add_meta_box( 'gpminvoice-group', 'Custom Repeatable', 'Repeatable_meta_box_display', 'page', 'normal', 'default'); | |
} | |
function Repeatable_meta_box_display() { | |
global $post; | |
$gpminvoice_group = get_post_meta($post->ID, 'customdata_group', true); |
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 cities = [ | |
{ | |
name: 'berlin', | |
latitude: '52.5167', | |
longitude: '13.3833', | |
}, | |
{ | |
name: 'athena', | |
latitude: '37.9667', | |
longitude: '23.7167', |
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
public struct RandomNumberGenerator: SequenceType { | |
let range: Range<Int> | |
let count: Int | |
public init(range: Range<Int>, count: Int) { | |
self.range = range | |
self.count = count | |
} | |
public func generate() -> GeneratorOf<Int> { |
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 | |
/** | |
* Plugin Name: Name Of The Plugin | |
* Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates | |
* Description: A brief description of the Plugin. | |
* Version: The Plugin's Version Number, e.g.: 1.0 | |
* Author: Name Of The Plugin Author | |
* Author URI: http://URI_Of_The_Plugin_Author | |
* License: A "Slug" license name e.g. GPL2 | |
*/ |
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
//to exclude a field from notifications assign the field the CSS Class Name gf_exclude and then use the {all_fields:exclude} merge tag | |
add_filter( 'gform_merge_tag_filter', 'exclude_from_all_fields', 10, 4 ); | |
function exclude_from_all_fields( $value, $merge_tag, $options, $field ) { | |
$options_array = explode( ",", $options ); //breaks options into an array | |
$exclude = in_array( "exclude", $options_array ); //returns TRUE if 'exclude' is found in the array | |
$class_array = explode( " ", $field["cssClass"] ); //breaks the fields CSS classes into an array | |
$exclude_class = in_array( "gf_exclude", $class_array ); //returns TRUE if 'gf_exclude' is found in the array | |
if ( $merge_tag == "all_fields" && $exclude == true && $exclude_class == true ) | |
return false; |
NewerOlder