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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Parse XML</title> | |
<script> | |
function getXML(fileUrl) | |
{ |
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
img:not([src]) { | |
visibility: hidden; | |
} | |
/* IE/Edge */ | |
img[data-src]:not([src]), | |
img[data-srcset]:not([src]) { | |
display: block; | |
min-height: 1px; | |
} |
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
jQuery.event.special.touchstart = { | |
setup: function( _, ns, handle ){ | |
if ( ns.includes("noPreventDefault") ) { | |
this.addEventListener("touchstart", handle, { passive: false }); | |
} else { | |
this.addEventListener("touchstart", handle, { passive: 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
document.querySelectorAll('.copy-text').forEach(function(elem) { | |
elem.addEventListener('click', function() { | |
var copyText = this.getAttribute('data-copyText'); | |
copyToClipboard(copyText); | |
}); | |
}); | |
function copyToClipboard(text) { | |
var selected = false; |
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 | |
source /usr/bin/cprintf.sh | |
########################################################### | |
# Generate a new SSL | |
# @param string $1 domain | |
if [ -n "$1" ]; then | |
domain="$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
add_action( 'init', function() { | |
// Remove the REST API endpoint. | |
remove_action('rest_api_init', 'wp_oembed_register_route'); | |
// Turn off oEmbed auto discovery. | |
// Don't filter oEmbed results. | |
remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10); | |
// Remove oEmbed discovery links. |
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
{ | |
// -> Files | |
"files.trimTrailingWhitespace": true, | |
// -> Editor | |
"editor.defaultFormatter": "esbenp.prettier-vscode", | |
"editor.formatOnSave": true, | |
"editor.renderWhitespace": "all", | |
"editor.formatOnPaste": true, | |
"editor.codeActionsOnSave": { |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
func IndexHandler(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprint(w, "Hello World") | |
} |
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
FROM nginx:1.19.4-alpine | |
COPY default.conf /etc/nginx/conf.d/ | |
WORKDIR /var/www/html |
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
" Show line numbers | |
set nu | |
" Enable filetype plugins | |
filetype plugin on | |
filetype indent on | |
"Always show current position | |
set ruler |
OlderNewer