This file contains hidden or 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() { | |
'use strict'; | |
var changelog = []; | |
var date = new Date(); | |
var padLeft = function ( str ) { | |
var pad = '00'; | |
return pad.substring(0, pad.length - str.length) + str; | |
}; |
This file contains hidden or 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
// ========== | |
// = Highlight current date = | |
// ========== | |
(function() { | |
var | |
timeTable = $('.js--timetable'), | |
date = new Date(); | |
if(timeTable.length > 0) { | |
date = date.getDay(); | |
timeTable.children('[data-day="'+date+'"]').addClass('today'); |
This file contains hidden or 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://support.cloudflare.com/hc/en-us/articles/200168236-What-does-CloudFlare-IP-Geolocation-do- | |
if ( apply_filters( 'edd_vat_use_cf_ip_header', false ) && ! empty( $_SERVER['HTTP_CF_IPCOUNTRY'] ) && 'XX' !== $_SERVER['HTTP_CF_IPCOUNTRY'] ) | |
{ | |
$this->ip_address_country = $_SERVER['HTTP_CF_IPCOUNTRY']; | |
return $this->ip_address_country; | |
} |
This file contains hidden or 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 | |
# | |
# Gist: https://gist.github.com/primozcigler/e816919feea345ca393dc4ae90a872fd | |
# How to use it: https://primoz.blog/simple-bash-script-can-tell-releases-given-date-period/ | |
if [[ $# -ne 2 ]]; then | |
echo "usage: $0 <start date> <end date>" | |
echo "<date> in format 'YYYY-MM-DD'" | |
exit | |
fi |
This file contains hidden or 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
// Go to https://account.templatemonster.com/#/billing and scroll down to show enough BILLING HISTORY items | |
// Then run the script | |
{ | |
const dateRegex = /aug \d+, 2017/i | |
// startDate = new Date('2017-8-1 00:00:00'), | |
// endDate = new Date('2017-9-1 00:00:00'), | |
allRows = Array.from($$( '.billing-history-operation' )); | |
This file contains hidden or 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 serial | |
""" | |
Tehtnica: Libela Elsi G 325 (https://www.libela-elsi.si/en/retail-scales/retail-scales-without-printer/) | |
Protokol: TISA-4 (0) | |
https://pypi.org/project/pyserial/ | |
https://pyserial.readthedocs.io/en/latest/shortintro.html | |
Podatki za povezavo s tehtnice: 9600 8 N 1 |
OlderNewer