Skip to content

Instantly share code, notes, and snippets.

View mihahribar's full-sized avatar

Miha Hribar mihahribar

View GitHub Profile
Verifying myself: My Bitcoin username is +mihahribar. https://onename.io/mihahribar
@mihahribar
mihahribar / borg.php
Created July 17, 2012 01:06
Warning example
<?php
class Person
{
function assimilate($alwaysAskPermission = true)
{
// code
}
}
@mihahribar
mihahribar / image_embed.css
Created July 15, 2012 18:50
CSS image embed
a.icon {
background: url(data:image/png;base64,LONG BASE 64 STRING) no-repeat right;
}
@mihahribar
mihahribar / mod_expires_etag
Created July 15, 2012 00:38
mod_expires and etag settings
FileETag None
ExpiresActive on
ExpiresDefault "access 1 month"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
@mihahribar
mihahribar / mod_deflate
Created July 15, 2012 00:22
mod_deflate settings
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
@mihahribar
mihahribar / uuid-trunk.patch
Created June 9, 2012 20:00
UUID build patch for trunk
diff --git a/config.m4 b/config.m4
index fca4c2e..e536d95 100644
--- a/config.m4
+++ b/config.m4
@@ -8,16 +8,29 @@ PHP_ARG_WITH(uuid, whether uuid is available,[ --with-uuid[=DIR] With uuid s
if test "$PHP_UUID" != "no"; then
PHP_CHECK_FUNC_LIB(uuid_type, uuid)
PHP_CHECK_FUNC_LIB(uuid_variant, uuid)
-
+ PHP_CHECK_FUNC_LIB(uuid_time, uuid)
@mihahribar
mihahribar / uuid.patch
Created June 7, 2012 19:58
UUID build patch
diff --git a/uuid-1.0.2/config.m4 b/uuid-1.0.2/config.m4
index fca4c2e..e536d95 100644
--- a/uuid-1.0.2/config.m4
+++ b/uuid-1.0.2/config.m4
@@ -8,16 +8,29 @@ PHP_ARG_WITH(uuid, whether uuid is available,[ --with-uuid[=DIR] With uuid s
if test "$PHP_UUID" != "no"; then
PHP_CHECK_FUNC_LIB(uuid_type, uuid)
PHP_CHECK_FUNC_LIB(uuid_variant, uuid)
-
+ PHP_CHECK_FUNC_LIB(uuid_time, uuid)
@mihahribar
mihahribar / gist:2862320
Created June 3, 2012 06:50
Error with brew install php54-gearman
hal:~ miha$ brew install php54-gearman --HEAD
==> Installing php54-gearman
==> Checking out https://svn.php.net/repository/pecl/gearman/trunk/
==> phpize
==> ./configure --prefix=/usr/local/Cellar/php54-gearman/HEAD --with-gearman=/usr/local/Cellar/gearman/0.33
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
#icon {
width: 52px;
height: 52px;
}
#icon.error {
background: url(notice_error.gif) no-repeat;
}
#icon.notice {
...
<div id="icon" class="notice"></div>
...