Skip to content

Instantly share code, notes, and snippets.

Avatar
🍎
Eating an apple.

Locke Bircher soundslocke

🍎
Eating an apple.
View GitHub Profile
@necolas
necolas / snippet.js
Created Jun 14, 2011
Optimised async loading of cross-domain scripts
View snippet.js
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
*/
(function(doc, script) {
var js,
fjs = doc.getElementsByTagName(script)[0],
View nginx-cors.conf
map $http_origin $allow_origin {
default "";
"~^https?://(?:[^/]*\.)?(stevebuzonas\.(?:com|local))(?::[0-9]+)?$" "$http_origin";
}
map $request_method $cors_method {
default "allowed";
"OPTIONS" "preflight";
}
@citrusui
citrusui / dropdown.md
Last active Oct 11, 2020
"Dropdowns" in Markdown
View dropdown.md
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@danielstgt
danielstgt / imagick3.4.4-PHP7.4-forge.sh
Last active Oct 1, 2020
Install ImageMagick / Imagick 3.4.4 on PHP 7.4 server (Laravel Forge)
View imagick3.4.4-PHP7.4-forge.sh
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xvzf imagick-3.4.4.tgz
You can’t perform that action at this time.