Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Rob Record robrecord

🏠
Working from home
View GitHub Profile
View gist:29d7b4ea8de147acdbb5ed79afd223b7
#!/usr/bin/env bash
#from https://gist.github.com/dvishniakov/86c83ef891d200674522c791589d42b3
# Provides stack trace when error occurs or when manually called
# $1 is message
# $2 is command
# ${ContinueOnErrors} controls whether to continue or stop script if error is catched.
# it helps during batch processing. -o errexit/errtrace also affects this
errexit() {
local errno=$? # non-zero when this function is called via trap
@JasonLG1979
JasonLG1979 / asound.conf
Last active Nov 10, 2020
/etc/asound.conf
View asound.conf
# /etc/asound.conf
###############################################################################
pcm.hqstereo20 {
@args [
SAMPLE_RATE FORMAT BUFFER_PERIODS
BUFFER_PERIOD_TIME VOL_MIN_DB
VOL_MAX_DB VOL_RESOLUTION VOL_NAME
]
View .gitignore_global
*~
*.diff
*.err
*.orig
*.rej
*.swo
*.swp
*.vi
# Compiled source #
View enable-disable-plugins-when-doing-local-dev.php
<?php
/*
Plugin Name: Enable/Disable plugins when doing local dev
Plugin URL: https://gist.github.com/pbiron/52bb63042cf220256ece89bc07fb57b0
Description: If the WP_LOCAL_DEV constant is true, enables/disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Paul V. Biron/Sparrow Hawk Computing
Author URI: https://sparrowhawkcomputing.com
*/
@VirtuBox
VirtuBox / php7.1.md
Last active Jan 30, 2020
How to install php7.1-fpm with EasyEngine
View php7.1.md

How to install php7.1-fpm with EasyEngine


Install php7.1-fpm

apt install php7.1-common php7.1-cli php7.1-zip php7.1-opcache php7.1-mysql php7.1-mcrypt php7.1-mbstring php7.1-json php7.1-intl php7.1-gd php7.1-fpm php7.1-curl php7.1-bz2

Copy the php7.1-fpm pool configuration from php7.0-fpm

cp -f /etc/php/7.0/fpm/pool.d/www.conf /etc/php/7.1/fpm/pool.d/www.conf
@ryansechrest
ryansechrest / post-receive.sh
Last active Feb 12, 2017
Git post-receive hook to deploy WordPress and plugins as submodules. It can also install Node.js modules with npm and vendor packages with Composer.
View post-receive.sh
#!/bin/bash
# Created on 7/17/13 by Ryan Sechrest
# Deploys pushed branch from the origin repository to the web directory
if [[ (-n $1) && (-n $2) && (-n $3) ]]; then
# Set path to project directory
project_path="/var/www/domains/$2/$3"
@jcanfield
jcanfield / msie-vmwarefusion-osx.bash
Created Apr 3, 2013
Download the latest VMWare Fusion images from Modern.IE for Internet Explorer Testing. This bash script is primitive and simple. Anybody who would like to expand on this is more than welcome to.
View msie-vmwarefusion-osx.bash
#!/bin/bash
# Download all VMWare Fusion machines from Modern.IE Website to test your Website/Web Application in Microsoft Internet Explorer on Mac OSX. All VM's and other VM's for Windows and Linux and other Virtual Manager's such as VirtualBox can be found at http://modern.ie/
# Don't have cURL or want to learn more, visit http://curl.haxx.se/.. are you really a Developer? First part of that sentence comes from the MS site.
read -p "--> Downloading Internet Explorer 6-10 on Windows XP/7/8 Appliances for VMWare Fusion. Large downloads ahead. (Press Enter to continue)."
echo "--> Download Internet Explorer 6 on Microsoft Windows XP Appliance for VMWare Fusion."
curl --progress-bar -O "http://virtualization.modern.ie/vhd/IEKitV1_Final/VMWare_Fusion/IE6_XP/IE6.XP.For.MacVMware.sfx"
echo "--> Download Internet Explorer 8 on Microsoft Windows XP Appliance for VMWare Fusion."
@byymster
byymster / woocommerce-modal-variation.php
Created Dec 12, 2012
WooCommerce ajax modal add to cart for variable products NOTE: working with PrettyPhoto js plugin, folder name for plugin woocommerce-modal-variation
View woocommerce-modal-variation.php
<?php
/*
Plugin Name: woocommerce modal variationn
Plugin URI: #
Description: show modal window with product variations after clicking -add to cart-.
Version: 0.1
Author: Maks Buriy
Author URI: mailto:byymster@gmail.com
License: GPL2
*/
@rtorr
rtorr / gist:2493270
Created Apr 25, 2012
Temporary fix for using symlinks with google drive (gdrive) on mac
View gist:2493270
Because gdrive will not actually sync symlinks from your computer to gdrive, you should temporarily do the opposite.
For example, I wanted to have a symlink from my ~/Sites directory to automatically sync with gdrive, so i did the simple command:
ln -s ~/Sites/drive ~/Google\ Drive/mSites/
That will not sync at the moment.
So instead I made a directory in gdrive and did a symlink back in my ~/Sites directory