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 allow_svg_in_tinymce( $init ) { | |
// NOTE: This doesn't take into account any security concerns regarding SVG. | |
// It doesn't remove potential vulnerable elements, etc. It just allows | |
// SVG, as is, assuming that the uploader is trusted. However, it would | |
// be easy to remove elements such as script if desired. Just remove from | |
// the array. | |
$svgElemList = array( | |
'a', |
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 static class Program | |
{ | |
private static readonly string[] Arrays = new[] | |
{ | |
"jerry", | |
"Kate", | |
"Steve", | |
"Mark", | |
"Joe" | |
}; |
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
CCA2 | Name | CCA3 | Nationality | |
---|---|---|---|---|
AD | Andorra | AND | Andorran | |
AE | United Arab Emirates | ARE | Emirati | |
AF | Afghanistan | AFG | Afghan | |
AG | Antigua and Barbuda | ATG | Antiguan, Barbudan | |
AI | Anguilla | AIA | Anguillian | |
AL | Albania | ALB | Albanian | |
AM | Armenia | ARM | Armenian | |
AN | Netherlands Antilles | NULL | Dutch | |
AO | Angola | AGO | Angolan |
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
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git |
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
/* Modern Font Stacks */ | |
/* System */ | |
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; | |
/* Times New Roman-based serif */ | |
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
/* A modern Georgia-based serif */ | |
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif; |
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
using System; | |
using System.Diagnostics; | |
using System.Text; | |
using System.Threading.Tasks; | |
// based on https://gist.github.com/AlexMAS/276eed492bc989e13dcce7c78b9e179d | |
public static class ProcessAsyncHelper | |
{ | |
public static async Task<ProcessResult> RunProcessAsync(string command, string arguments, int timeout) | |
{ |
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( 'wp_enqueue_scripts', 'dequeue_woocommerce_styles_scripts', 99 ); | |
function dequeue_woocommerce_styles_scripts() { | |
if ( function_exists( 'is_woocommerce' ) ) { | |
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { | |
# Styles | |
wp_dequeue_style( 'woocommerce-general' ); | |
wp_dequeue_style( 'woocommerce-layout' ); | |
wp_dequeue_style( 'woocommerce-smallscreen' ); | |
wp_dequeue_style( 'woocommerce_frontend_styles' ); |
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
location ~* ^/images/.+\.(png|jpg)$ { | |
root /home/www-data; | |
add_header Vary Accept; | |
try_files "${uri}.webp" $uri =404; |
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/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
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
using Google.Apis.AnalyticsReporting.v4; | |
using Google.Apis.Auth.OAuth2; | |
using Google.Apis.Services; | |
using System; | |
using System.IO; | |
using System.Security.Cryptography.X509Certificates; | |
namespace GoogleAnaltyics.V4 | |
{ | |
public class ServiceAccountJson |
NewerOlder