HTML + CSS powered calendar template.
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 | |
// reference https://github.com/WP-API/WP-API/blob/develop/lib/infrastructure/class-wp-rest-server.php | |
// serve_request() function | |
add_filter( 'rest_pre_serve_request', 'multiformat_rest_pre_serve_request', 10, 4 ); | |
function multiformat_rest_pre_serve_request( $served, $result, $request, $server ) { | |
// assumes 'format' was passed into the intial API route | |
// example: https://baconipsum.com/wp-json/baconipsum/test-response?format=text |
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
version: "3" | |
services: | |
db: | |
build: db | |
read_only: true | |
restart: unless-stopped | |
volumes: | |
- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data | |
- /etc/localtime:/etc/localtime:ro | |
environment: |
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
.idea/ |
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 | |
# https://docs.docker.com/engine/reference/commandline/ps/#format | |
df -h / | |
for container in $(docker ps --format "{{.Names}}") | |
do | |
echo "Truncating logs for the '${container}' container ..." | |
# https://forums.docker.com/t/how-to-limit-or-rotate-docker-container-logs/112378/9 |
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
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
.pytest_cache/ | |
*.py[cod] | |
*$py.class | |
*.swp | |
# C extensions | |
*.so |
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 { fsExists } from './utils'; | |
if ( ! ( await fsExists( folder ) ) ) { | |
// ... | |
} |
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
// open any Daft page and go the dev console | |
clear(); | |
const data = JSON.parse(document.querySelector('script[id="__NEXT_DATA__"]').textContent); | |
const listing = data.props.pageProps.listing; | |
console.log( listing.title ); | |
// grab the images | |
const images = listing.media.images.map( img => img['size1440x960'] ); |
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 41 columns, instead of 40 in line 3.
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
"sex" "age" "village/city" "1985 Jan" "1986 Jan" "1987 Jan" "1988 Jan" "1989 Jan" "1990 Jan" "1991 Jan" "1992 Jan" "1993 Jan" "1994 Jan" "1995 Jan" "1996 Jan" "1997 Jan" "1998 Jan" "1999 Jan" "2000 Jan" "2001 Jan" "2002 Jan" "2003 Jan" "2004 Jan" "2005 Jan" "2006 Jan" "2007 Jan" "2008 Jan" "2009 Jan" "2010 Jan" "2011 Jan" "2012 Jan" "2013 Jan" "2014 Jan" "2015 Jan" "2016 Jan" "2017 Jan" "2018 Jan" "2019 Jan" "2020 Jan" "2021 Jan" "2022 Jan" | |
"Total (sex)" "Total (age)" "Total Faroe Islands" 45347 45677 46240 46880 47570 47772 47347 47203 46735 45259 43640 43323 43745 44226 44760 45342 46127 46941 47648 48146 48299 48120 48262 48302 48603 48485 48431 48178 48029 48122 48590 49099 49791 50462 51273 52103 52899 53664 | |
"Total (sex)" "Total (age)" "Hattarvík" 27 27 27 30 36 37 29 33 40 39 32 30 26 24 22 20 20 18 17 16 17 16 15 16 15 16 17 15 14 14 14 13 13 12 11 11 11 10 | |
"Total (sex)" "Total (age)" "Kirkja" 35 32 32 25 24 24 24 24 24 30 22 21 18 18 19 20 30 30 28 29 28 27 28 26 25 22 22 22 23 28 26 27 32 25 26 27 30 |
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
npm remove @types/mocha mocha | |
npm i --save-dev @types/jest jest | |
npm i --save-dev ts-jest | |
npx ts-jest config:init | |
and provide testRegex entry in jest.config.js file. |
NewerOlder