Skip to content

Instantly share code, notes, and snippets.

View valmayaki's full-sized avatar
🤠
Happy to be of service to you!

Valentine Ubani Mayaki valmayaki

🤠
Happy to be of service to you!
View GitHub Profile
@friedemannsommer
friedemannsommer / hhvm.conf
Last active November 27, 2016 23:07
Takes care about installing NGINX, NGINX-RTMP, NGINX-Pagespeed, LibreSSL, PHP, Composer, Laravel, Symfony, Node, NVM, OhMyZSH
; php options
pid = /var/run/hhvm/pid
; hhvm specific
hhvm.server.file_socket = /var/run/hhvm/hhvm.sock
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.server.user = www-data
@ali
ali / ntf
Created January 18, 2012 00:33
Growl Notify for Bash: Runs command & shows Growl notification on completion
#!/bin/bash
# ntf
# Runs the command passed as the argument and shows a Growl notification when it's done.
# Usage: ntf <command>
# Example: `ntf echo hi`
# Requires Growl Notify: http://growl.info/extras.php#growlnotify
# Author: Ali Ukani
GROWLNOTIFY=/usr/local/bin/growlnotify # Location of growlnotify
@MikeGrace
MikeGrace / krl-commit-with-growl-notification.sh
Created June 14, 2010 04:43
Shell script sets up bash .profile to show growl notification on 'krl commit'
#!/bin/bash
# Copyright 2010 Michael Grace
# http://geek.michaelgrace.org
# Created 06/13/2010
clear
echo "Script created by Mike Grace http://www.google.com/profiles/themikegrace"
echo "========================================================================"
echo ""
# check if script is run as root or with sudo
@DevinWalker
DevinWalker / woocommerce-vitual-mark-complete.php
Created April 6, 2013 07:49
WooCommerce Mark Virtual Orders as Complete
//Mark Virtual Orders as Complete
add_filter( 'woocommerce_payment_complete_order_status', 'virtual_order_payment_complete_order_status', 10, 2 );
function virtual_order_payment_complete_order_status( $order_status, $order_id ) {
$order = new WC_Order( $order_id );
if ( $order_status == 'processing' &&
( $order->status == 'on-hold' || $order->status == 'pending' || $order->status == 'failed' ) ) {
$virtual_order = true;
anonymous
anonymous / docke-compose.yml
Created January 6, 2017 18:32
version: '2'
services:
database:
image: mysql:5.6
volumes:
- dbdata:/var/lib/mysql
environment:
- "MYSQL_DATABASE=homestead"
- "MYSQL_USER=homestead"
@bentasm1
bentasm1 / functions.php
Created October 14, 2015 02:47
WC Vendors Pro - Adding or removing product types or options
/* WC Vendors Pro - Remove, add, or alter, product types */
add_filter('product_type_selector', 'custom_product_type_selector');
function custom_product_type_selector() {
$product_type = array(
'simple' => __( 'Simple product', 'wcvendors-pro' ) // If you add more product types after this, add a comma after the last ) parenthesis.
//'grouped' => __( 'Grouped product', 'wcvendors-pro' ) // If you add more product types after this, add a comma after the last ) parenthesis.
//'external' => __( 'External/Affiliate product', 'wcvendors-pro' ) // If you add more product types after this, add a comma after the last ) parenthesis.
//'variable' => __( 'Variable product', 'wcvendors-pro' ) // If you add more product types after this, add a comma after the last ) parenthesis.
// For the last product type, make sure there is NO COMMA after the right ) parenthesis.
);
@corsonr
corsonr / gist:7008044
Created October 16, 2013 13:50
Mastering WooCommerce Products Custom Fields 1
// Display Fields
add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' );
// Save Fields
add_action( 'woocommerce_process_product_meta', 'woo_add_custom_general_fields_save' );
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Simple Backbone WordPress Example</title>
<link rel="stylesheet" href="base.css">
</head>
<body>
<ul id="post-list"></ul>
@corsonr
corsonr / gist:7008344
Created October 16, 2013 14:08
Mastering WooCommerce Products Custom Fields 5
// Textarea
woocommerce_wp_textarea_input(
array(
'id' => '_textarea',
'label' => __( 'My Textarea', 'woocommerce' ),
'placeholder' => '',
'description' => __( 'Enter the custom value here.', 'woocommerce' )
)
);
@vuejsdevelopers
vuejsdevelopers / script.js
Created May 25, 2017 14:20
Using JSX with Vue.js - Snippet 08
{
test: /\.js$/,
exclude: [/node_modules/],
use: [{
loader: 'babel-loader',
options: { presets: ['es2015'], plugins: ['transform-vue-jsx'] }
}]
}