Skip to content

Instantly share code, notes, and snippets.

View hfcorriez's full-sized avatar
🏠
Working from home

hfcorriez hfcorriez

🏠
Working from home
View GitHub Profile
@hfcorriez
hfcorriez / apc.ini
Created July 16, 2013 05:21
Best apc configuration.
[APC]
extension=apc.so
apc.enabled=1
apc.shm_segments=1
;32M per WordPress install
apc.shm_size=128M
;Relative to the number of cached files (you may need to watch your stats for a day or two to find out a good number)
apc.num_files_hint=7000
@hfcorriez
hfcorriez / brewfix.sh
Created February 9, 2014 10:37
Brew update failed solution
cd $(brew --prefix)
git reset --hard HEAD
brew update
@hfcorriez
hfcorriez / async_raven.js
Last active December 14, 2018 09:01
Load raven js async (ga.js like)
!function(n,e,a,t,o,r,s,c){var c=c||[];n.onerror=function(n,e,a){c.push([n,e,a])};var i=!1;
r=e.createElement(a),s=e.getElementsByTagName(a)[0],r.async=1,r.src=t,r.crossorigin="anonymous",
r.onreadystatechange=r.onload=function(){if(!i){Raven.config(o).install();for(var n=0;n<c.length;n++)Raven.captureMessage("Message: "+c[n][0]+" - URL: "+c[n][1]+" - Line: "+c[n][2])}i=!0}
,s.parentNode.insertBefore(r,s)
}(window,document,"script","https://cdn.ravenjs.com/3.16.0/raven.min.js","https://[email protected]/xx");
@hfcorriez
hfcorriez / fully_async_ga.js
Created July 7, 2017 10:42
Fully async ga
if (!DDAsyncLoad) {
function DDAsyncLoad(cb) {
if (window.attachEvent) {
window.attachEvent('onload', cb);
} else {
window.addEventListener('load', cb, false);
}
}
}
;(function (id, name, context, definition) {
// --------------------------------------------------------------------------
// Dependencies
//
// This is an attempt to make this library compatible with multiple module
// formats. Other UMD implementations do not take into account dependencies:
// Example: https://github.com/ForbesLindesay/umd/blob/master/template.js
//
// **NOTE: Named AMD modules are more suitable for libraries as it provides