Skip to content

Instantly share code, notes, and snippets.

View cocolee's full-sized avatar

Rıfat Caner Anıltürk cocolee

View GitHub Profile
@Akryum
Akryum / gist:6bab33ad28b4b786cc5fe85c20b2585a
Created September 29, 2022 10:21
RegExp to find dynamic Vue component imports
=\s\(\) => import\([\s\n]*(\/\*.*?\*\/[\s\n]*)?'.*?\.vue'[\s\n]*\)
@webmaster-z1lab
webmaster-z1lab / AWS-ubuntu-2004-nodeserver.md
Last active October 17, 2022 18:14
Setup a Ubuntu 20.04 Nodejs webserver (NuxtJS ready) with Nginx (PageSpeed build), Brotli compression, LetsEncrypt SSL, Yarn (NPM) and PM2.
@tomhicks
tomhicks / plink-plonk.js
Last active November 12, 2024 19:08
Listen to your web pages
@kagg-design
kagg-design / class-multilingual.php
Created October 31, 2019 15:04
Fix performance issue in Jupiter X with WPML and Polylang. Replace code of \CustomizerMultilingual::get_custom_customizer_option
<?php
protected function get_custom_customizer_option() {
static $theme_slug = null;
$current_language = self::get_language();
if ( ! $theme_slug ) {
$theme_slug = get_option( 'template' );
}
$option_prefix = str_replace( '-', '_', $theme_slug );
$option_name = $option_prefix . self::get_option_key() . $current_language;
@karlhillx
karlhillx / macos_mojave_homebrew_apache_php_mariadb_2019.md
Last active January 4, 2025 05:36
macOS Mojave Setup: Homebrew + Apache + PHP + MariaDB (Regularly updated)

macOS Mojave Setup: Homebrew + Apache + PHP + MariaDB

This document provides help on getting your macOS development environment up and running with the latest versions of Homebrew, Apache, PHP, etc.

Homebrew Logo

Homebrew Installation

Homebrew is an excellent package manager for macOS; let's install it.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@psychonetic
psychonetic / CustomVeeValidator
Last active April 4, 2020 07:02
Vue-Dropzone and Vee-Validate
// Custom Validator to add errors into vuex store and also handle laravel form errors.
import { mapGetters } from 'vuex';
import { CLEAR_FORM_ERRORS, ERROR } from '../vuex/types';
import Vue from 'vue';
export default {
data() {
return {
errors: [],
keepServerErrors: ['unique', 'boolean', 'exists', 'regular_chars', 'identifier', 'date'],
<?php
/*
This script will allow you to send a custom email from anywhere within wordpress
but using the woocommerce template so that your emails look the same.
Created by [email protected] on 27th of July 2017
Put the script below into a function or anywhere you want to send a custom email
*/
@jasperf
jasperf / cf7.css
Last active June 9, 2022 09:34 — forked from codehandling/cf7.css
Contact Form 7 Styles for basic CSS styling of the form. Form is responsive and has nice rounded corners. For labels and placeholders you need to edit the form in CF7 https://imwz.io/contact-form-7-css-boilerplate/
/*
** Contact Form 7 basics
**
**/
/* Form width and border */
.wpcf7 {
text-align: left;
width: 90%;
@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active November 10, 2024 20:52
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

@robertsdionne
robertsdionne / deepdream-install.md
Last active February 15, 2021 16:07
Deepdream installation
#!/usr/bin/env bash

# Assuming OS X Yosemite 10.10.4

# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install