Skip to content

Instantly share code, notes, and snippets.

View linuxbastard's full-sized avatar
🎯
Focusing

Ronaldo Bartolome linuxbastard

🎯
Focusing
View GitHub Profile
@linuxbastard
linuxbastard / owl-carousel.js
Created October 5, 2022 04:20 — forked from verticalgrain/owl-carousel.js
Owl Carousel go to specific slide
@linuxbastard
linuxbastard / package.json
Created August 25, 2018 14:32
Package Json after an npm install
{
"name": "foundationpress",
"title": "FoundationPress",
"version": "2.10.4",
"description": "FoundationPress is a WordPress starter theme based on Foundation 6 by Zurb",
"homepage": "https://foundationpress.olefredrik.com",
"license": "MIT",
"main": "gulpfile.js",
"scripts": {
"start": "gulp",
@linuxbastard
linuxbastard / debug.og
Created August 20, 2018 22:37
npm debug log
0 info it worked if it ends with ok
1 verbose cli [ '/home/linuxbastard/.nvm/versions/node/v8.11.4/bin/node',
1 verbose cli '/home/linuxbastard/.nvm/versions/node/v8.11.4/bin/npm',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
@linuxbastard
linuxbastard / functions.php
Created August 9, 2018 22:20
Printing arrays and objects in debug.log
<?php
/*
* wp-config.php must be set to:
* define( 'WP_DEBUG', true );
* define( 'WP_DEBUG_DISPLAY', false );
* define( 'WP_DEBUG_LOG', true );
*/
if ( is_array($var_obj_arr) || is_object($var_obj_arr) ) {
error_log( print_r($var_obj_arr, true) );
} else {
@linuxbastard
linuxbastard / woo-checkout-fields.php
Created April 23, 2018 19:26 — forked from bavington/woo-checkout-fields.php
Reorder Checkout Fields in WooCommerce
// Reorder Checkout Fields
add_filter('woocommerce_checkout_fields','reorder_woo_fields');
function reorder_woo_fields($fields) {
$fields2['billing']['billing_email'] = $fields['billing']['billing_email'];
$fields2['billing']['billing_first_name'] = $fields['billing']['billing_first_name'];
$fields2['billing']['billing_last_name'] = $fields['billing']['billing_last_name'];
$fields2['billing']['billing_country'] = $fields['billing']['billing_country'];
$fields2['billing']['billing_address_1'] = $fields['billing']['billing_address_1'];
$fields2['billing']['billing_address_2'] = $fields['billing']['billing_address_2'];
namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
animation: "fade", //String: Select your animation type, "fade" or "slide"
easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
reverse: false, //{NEW} Boolean: Reverse the animation direction
animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
startAt: 0, //Integer: The slide that the slider should start on. Array nota
@linuxbastard
linuxbastard / dabblet.css
Created May 30, 2017 07:57
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@linuxbastard
linuxbastard / update-mysql56.sh
Created September 23, 2016 15:36 — forked from technosailor/update-mysql56.sh
Updates VVV MySQL 5.5 to 5.6 -- Ubuntu 14.04
#!/bin/bash
# Usage: ./update-mysql56.sh
# Backup of all databases... JUST IN CASE
mysqldump --all-databases --single-transaction --events --user=root --password > ~/all_database_backup.sql
# Remove MySQL 5.5
sudo apt-get remove mysql-server
sudo apt-get autoremove
#!/usr/bin/env bash
#
# Nginx - new server block
# http://rosehosting.com
# Functions
ok() { echo -e '\e[32m'$1'\e[m'; } # Green
working() { echo -ne '\e[1;33m'$1'\e[m'; } # Yellow
die() { echo -e '\e[1;31m'$1'\e[m'; exit 1; }