Skip to content

Instantly share code, notes, and snippets.

View keschat's full-sized avatar
🏠
Working from home

kesi keschat

🏠
Working from home
  • R3 Technica
  • Cape Town
View GitHub Profile
@dmagda
dmagda / Chinook_PostgreSql_utf8.sql
Created February 23, 2023 15:45
Chinook Database
This file has been truncated, but you can view the full file.
/*******************************************************************************
Chinook Database - Version 1.4
Script: Chinook_PostgreSql.sql
Description: Creates and populates the Chinook database.
DB Server: PostgreSql
Author: Luis Rocha
License: http://www.codeplex.com/ChinookDatabase/license
********************************************************************************/
@lukecav
lukecav / .htaccess
Created August 17, 2022 20:06
MemberPress plugin rewrite rules
# BEGIN MemberPress Rules
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_COOKIE} mplk=([a-zA-Z0-9]+)
RewriteCond /var/www/somesite.com/wp-content/uploads/mepr/rules/%1 -f
RewriteRule ^(.*)$ - [L]
RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-includes|wp-content/plugins|wp-content/themes)
RewriteCond %{REQUEST_URI} \.(zip|gz|tar|rar|doc|docx|xls|xlsx|xlsm|pdf|mp4|m4v|mp3|ts|key|m3u8|ZIP|GZ|TAR|RAR|DOC|DOCX|XLS|XLSX|XLSM|PDF|MP4|M4V|MP3|TS|KEY|M3U8)$
RewriteRule . /wp-content/plugins/memberpress/lock.php [L]
@corsonr
corsonr / featured.json
Last active August 5, 2022 08:12
featured.json.txt
@workeffortwaste
workeffortwaste / woocommerce-to-css-grid.css
Last active December 27, 2024 21:41
woocommerce-to-css-grid
/* Convert the standard WooCommerce products list into a modern responsive grid. */
ul.products {
--grid-gap: 32px;
--auto-grid-min-size: 200px;
grid-template-columns: repeat(auto-fill, minmax(var(--auto-grid-min-size), 1fr));
grid-gap: var(--grid-gap);
display: grid;
}
ul.products:before{
content:unset!important;
1. Add dependecy:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
2.Create config file for log4j (https://logging.apache.org/log4j/2.x/manual/configuration.html).
I prefer log4j2-test.properties because according documentation this format will look second, after configFile:
'If no system property is set the properties ConfigurationFactory will look for log4j2-test.properties in the classpath.'
---------------------------------------------------------------
@lwxbr
lwxbr / woocommerce.css
Created January 29, 2019 11:39
woocomerce.css from storefront
@font-face {
font-family: star;
src: url(../../../../../plugins/woocommerce/assets/fonts/star.eot);
src: url(../../../../../plugins/woocommerce/assets/fonts/star.eot?#iefix) format("embedded-opentype"), url(../../../../../plugins/woocommerce/assets/fonts/star.woff) format("woff"), url(../../../../../plugins/woocommerce/assets/fonts/star.ttf) format("truetype"), url(../../../../../plugins/woocommerce/assets/fonts/star.svg#star) format("svg");
font-weight: 400;
font-style: normal
}
@-webkit-keyframes slideInDown {
from {
@SalahHamza
SalahHamza / install_ngrok.md
Last active November 24, 2025 16:03
How to install ngrok on linux subsystem for windows
@JayOkey
JayOkey / glupfile.js
Created August 19, 2018 01:32
Configure Browser Sync to work with WordPress and Valet
/**
*
* How to use this file
*
* Step 1: Ensure Gulp CLI is installed globally
* npm install gulp-cli -g
* Step 2: Install BrowserSync and Gulp as a local development dependency for the project. In most cases either the plugin or the theme directory that you're working in
* npm install browser-sync gulp --save-dev
* Step 3: Save this file to the directory and edit where appropriate
* Step 4: Type glup in the command line to initiate BrowserSync
function Mutilator(data, name, context) {
this.n = name || `mutilation-${+new Date()}`;
this.d = data;
this.c = context || window;
this.isArr = function(p) {
return this.d[p].constructor == Array;
};
this.dispatch = function(p, v, t) {
this.c.dispatchEvent(
new CustomEvent(this.n, {
@ve3
ve3 / Encryption.js
Last active August 10, 2023 10:51
Encrypt and decrypt between programming languages (PHP & JavaScript). (Newer version here https://gist.github.com/ve3/b16b2dfdceb0e4e24ecd9b9078042197 )
/**
* Encryption class for encrypt/decrypt that works between programming languages.
*
* @author Vee Winch.
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {