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 | |
$connection = mysqli_connect('127.0.0.1', 'root', '', 'uefa_teams'); | |
// Check connection | |
if (!$connection) { | |
die("Connection failed: " . mysqli_connect_error()); | |
} | |
if (isset($_GET['selectAllUEFAClubs'])) { | |
$selectAllUEFAClubs = $connection->query("SELECT * FROM clubs"); | |
if ($selectAllUEFAClubs -> num_rows > 0) { |
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 | |
/* | |
Plugin Name: Example Contact Form | |
Plugin URI: http://example.com | |
Description: Simple non-bloated WordPress Contact Form | |
Version: 1.0 | |
Author: Agbonghama Collins | |
Author URI: http://w3guy.com | |
Text Domain: cform | |
*/ |
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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
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
// fix bug when custom posts archive pagination does not work on page 2 and subsequent. | |
// This is the hack which works when WP_Query (not default loop) is used | |
$option_posts_per_page = get_option( 'posts_per_page' ); | |
add_action( 'init', 'my_modify_posts_per_page', 0); | |
function my_modify_posts_per_page() { | |
add_filter( 'option_posts_per_page', 'my_option_posts_per_page' ); | |
} | |
function my_option_posts_per_page( $value ) { | |
global $option_posts_per_page; | |
if ( is_tax( 'skill_tag') ) { |
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
'use strict' | |
var path = require('path'); | |
const webpack = require('webpack'); | |
const NODE_ENV = process.env.NODE_ENV || 'development'; | |
//const NODE_ENV = 'production'; | |
module.exports = { | |
context: __dirname + "/frontend", | |
entry: { |
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
// don't forget to install node-sass, sass-loader and (save-dev) css-hot-loader | |
'use strict'; | |
const autoprefixer = require('autoprefixer'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); |
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
const gulp = require('gulp'); | |
const browserSync = require('browser-sync'); | |
gulp.task('mobile', function() { | |
browserSync({ | |
proxy: 'localhost:8080', | |
open: 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
[alias] | |
co = checkout | |
cob = checkout -b | |
b = branch | |
bb = branch -vvv | |
ll = log --oneline | |
l = log | |
brd = branch -d | |
brD = branch -D | |
reom = !git fetch && git rebase origin/master |
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
/* | |
"@serverless-stack/resources": "0.59.1" | |
*/ | |
const deadLetterQueue = new sst.Queue(this, "DeadLetterQueue", { | |
sqsQueue: { | |
visibilityTimeout: Duration.hours(12), | |
}, | |
}); |
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 a collection in Yandex Translate and run the following script in your browser's developer console | |
function parseCollection() { | |
const arr = []; | |
document.querySelectorAll('.record-item_text > div:nth-child(2)').forEach(el => { | |
arr.push([el.textContent]) | |
}) | |
document.querySelectorAll('.record-item_translation > div:nth-child(2)').forEach((el, index) => { |
OlderNewer