Skip to content

Instantly share code, notes, and snippets.

@amnuts
amnuts / phprc
Last active August 11, 2023 09:23
Dreamhost PHP 5.6 phprc file
date.timezone = "Europe/London"
expose_php = 0
extension = phar.so
extension = fileinfo.so
extension = intl.so
suhosin.executor.include.whitelist = phar
[opcache]
zend_extension=opcache.so
@rfmeier
rfmeier / phprc
Last active March 12, 2019 02:50
Enable opcache on DreamHost for php 5.5 and greater
[opcache]
; the path to the .so file
zend_extension=opcache.so
; Enabled. Set to 0 to disable
opcache.enable=1
; Max memory consumption. Default 32 megs
opcache.memory_consumption=32
@georg90
georg90 / upload.html
Last active February 10, 2020 11:24
very simple koken mobile upload script
<!--
Change API Token
Change URL
-->
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.0/sweetalert.min.js"></script> <!-- for nice alerts -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.0/sweetalert.min.css">
</head>
@tdominey
tdominey / gist:6b3f336f2a0c302738aa
Created September 30, 2014 17:14
Make inserted images smaller in essays/pages
.k-lens-essay figure img,
.k-lens-page figure img
{
max-width:300px;
height:auto;
}
@zllovesuki
zllovesuki / request.php
Last active August 29, 2015 14:02
Cache Request
<?php
$website = 'http://yourwebsite.com'; //no trailing slash
$key = 'kokenwtf';
/*
*
* RUNNING ON A MACHINE THAT HAS UNLIMITED EXECUTION TIME IS HIGHLY ENCOURAGED
@zllovesuki
zllovesuki / cache.url.php
Created June 13, 2014 19:53
Cache URL Generator
<?php
$retina = true;
$key = 'kokenwtf'; //ENTER YOUR OWN KEY
if ($_GET['key'] != $key) die;
$ds = DIRECTORY_SEPARATOR;
$root = dirname(__FILE__);
$content = $root . $ds . 'storage';
@tdominey
tdominey / gist:6900672
Created October 9, 2013 12:44
Load a flat list of all Library albums without parent sets
<koken:load source="albums" filter:flat="true>
<koken:loop>
<koken:if data="{{ album.album_type }}" equals="standard">
{{ album.title }}
</koken:if>
</koken:loop>
</koken:load>
@tdominey
tdominey / gist:6543642
Created September 12, 2013 20:53
Use {{ location.here }} variable to know which page you're viewing
<koken:if data="location.here" equals="/">
<!-- We're on the home page -->
</koken:if>
<koken:if data="location.here" equals="/albums/">
<!-- We're on the albums index -->
</koken:if>
<koken:if data="location.here" equals="/albums/portraits/">
<!-- We're on the portraits album page -->
@wpsmith
wpsmith / fieldset.css
Last active October 11, 2018 18:46 — forked from paranoiq/aaa.txt
CSS: Cross-browser styling of <fieldset> and <legend> without any additional HTML elements
/*
Cross-browser styling of <fieldset> and <legend> without any additional HTML elements
basic rules:
- fieldset cannot have padding, because it would ruin the legend absolute positioning in Gecko
- cannot use relative positioning on legend, because it does not work in Opera
- legend cannot have padding, because it would break its 100% size in all browsers.
this cannot be fixed by overflow:hidden, because it is stupid in all IE
- selector priority in IE7 is wrong (!important)
*/
@ecornell
ecornell / firefox-bm-ah.css
Last active February 21, 2024 20:03
Firefox - Auto-hide Bookmark Bar | Works with Stylish
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#PersonalToolbar {
visibility: collapse !important;
opacity: 0.01;
-moz-transition: visibility 0.5s, opacity 0.5s ease !important;
position: fixed !important;
width: 100% !important;
padding: 3px 3px 3px 3px !important;
z-index: 10;