Skip to content

Instantly share code, notes, and snippets.

@screamingjungle
screamingjungle / package.json
Created March 22, 2017 16:39
Using NPM as task runner
{
"name": "npm.task.runner",
"version": "0.0.1",
"description": "npm task runner",
"main": "index.html",
"author": "",
"license": "ISC",
"scripts": {
"clean": "rimraf dist/{css/*,js/*,img/*}",
"autoprefixer": "postcss -u autoprefixer -r dist/css/*",
@screamingjungle
screamingjungle / opencart-v2102_to_v2303rc_post.sql
Created March 24, 2017 14:00
Updating an existing Opencart database from v2.1.0.2 to v2.3.0.2/v2.3.0.3rc
-- retains stale tables and fields in the vent of downgrading.
ALTER TABLE `oc_dm_address`
MODIFY `country_id` INT(11) NOT NULL DEFAULT '0',
MODIFY `zone_id` INT(11) NOT NULL DEFAULT '0'
;
ALTER TABLE `oc_dm_affiliate_activity`
CHANGE COLUMN activity_id affiliate_activity_id INT(11) NOT NULL AUTO_INCREMENT
;
@screamingjungle
screamingjungle / FirebaseOAuthError.md
Last active April 12, 2017 10:46
Firebase OAuth Error

[angular/angularfire#298]

Add my-app.firebaseapp.com (my-app is unique identifier of your Firebase App) to the HTTP referrers in the Browser-Key Credentials from the Google APIs console.

https://console.cloud.google.com/apis/credentials?project=my-app
Set CloudFlare to ignore query strings.
'''
/css/ui-lightness/jquery-ui-1.10.3.custom.min.css?901e5ea
'''
was returning 522 http status code and timing out resulting in slow page.
@screamingjungle
screamingjungle / osticket-gmail.txt
Created April 12, 2017 21:04
Configure GMail in OSTicket v1.10
Fetching Email via IMAP or POP
Hostname: imap.gmail.com
Port Number: 993
Fetched Emails> Move to folder: support
Sending Email via SMTP
Hostname: smtp.gmail.com (no "ssl://" or "tls://")
Port Number: 587
Authentication Required: Yes
Header Spoofing Allow for this Email Address: Yes
@screamingjungle
screamingjungle / hypervisor_switch.txt
Created May 2, 2017 22:26
Vagrant - Turn Hyper-V off in Windows
To turn Hypervisor off on windows from a command window: "bcdedit /set hypervisorlaunchtype off" and reboot.
To turn it back on: "bcdedit /set hypervisorlaunchtype on" and reboot.
@screamingjungle
screamingjungle / disable_zopim.php
Created May 19, 2017 13:42
Disable Wordpress Zopim/Zendesk Chat footer injection when Monitoring
<?php
/*
Plugin Name: Disable zopim when monitoring
Plugin URI: http://riotsupport.co.uk
Description: Removes zopim footer from pages with '--monitoring__tool__testing--' in the URL
Author: Matt Harvey
Version: 1.0
Author URI: http://riotsupport.co.uk
*/
@screamingjungle
screamingjungle / git pre-commit-hook to commit mysql shema
Created June 2, 2017 15:54
GIT MySQL DB Schema Pre-Commit-Hook
#!/bin/bash -e
# -e means exit if any command fails
DBHOST="localhost"
DBUSER="root"
DBPASS="passwd"
DBNAME="test"
SCHEMAPATH="__sql"
MYSQLBINPATH=""
@screamingjungle
screamingjungle / repo_specific_user.sh
Created June 12, 2017 10:41
Only use repo specific user accounts (when dealing with multiple parents)
you can run the following from the command line to get a per-repo email configured:
# Require setting user.name and email per-repo:
$ git config --global user.useConfigOnly true
# Remove email address from global config:
$ git config --global --unset-all user.email
@screamingjungle
screamingjungle / gist:d3993ef978e06055dd58bedd9ba01219
Last active July 6, 2017 18:19
RHEL: Find files that have not been accessed since
List:
find . -depth -type f -atime +7
Sum:
find . -depth -type f -atime +7 -print0 | xargs -0 du -hc | tail -n1