Skip to content

Instantly share code, notes, and snippets.

@overcome
overcome / gist:ff6d0d2289730dd6dc011a757d4ff547
Created August 12, 2022 06:05 — forked from erstwhile/gist:1315819
nginx microcaching config example
# Set cache dir
proxy_cache_path /var/cache/nginx levels=1:2
keys_zone=microcache:5m max_size=1000m;
# Virtualhost/server configuration
server {
listen 80;
server_name yourhost.domain.com;
# Define cached location (may not be whole site)
@overcome
overcome / CSS for <sup> and <sub>
Created November 13, 2019 09:47 — forked from unruthless/CSS for <sup> and <sub>
CSS for <sub> and <sup>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position
" Make IE Better Compatible "
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
======================================================
IE6 Only
==================
_selector {...}
@overcome
overcome / Random-string
Created July 29, 2019 08:55 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@overcome
overcome / client.js
Created June 5, 2018 02:41 — forked from hagino3000/client.js
WebSocket with binary data
var socket = null;
function bootstrap() {
// 適当な図形を描画
var c = document.getElementById('mycanvas');
var ctx = c.getContext('2d');
ctx.globalalpha = 0.3;
for(var i=0; i<1000; i++) {
ctx.beginPath();
@overcome
overcome / _filter.sass
Created December 8, 2017 07:04 — forked from johnferrie/_filter.sass
CSS3 Filter Effects Sass Mixin
// https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
//
// grayscale ex: filter: grayscale(100%);
// sepia ex: filter: sepia(100%);
// saturate ex: filter: saturate(0%);
// hue-rotate ex: filter: hue-rotate(45deg);
// invert ex: filter: invert(100%);
// brightness ex: filter: brightness(15%);
// contrast ex: filter: contrast(200%);
// blur ex: filter: blur(2px);
@overcome
overcome / SolrTYPO3.md
Created August 24, 2017 07:56 — forked from fedir/SolrTYPO3.md
TYPO3 Solr extension configuraiton sample

Constants

plugin.tx_solr {
	solr {
	scheme = http

	host = YY.YY.YY.YY
	port = 8080

path = /solr/core_XXXX/

@overcome
overcome / MyModel.php
Last active August 23, 2017 01:59 — forked from iamandrewluca/MyModel.php
typo3 extbase categories
<?php
/**
* categories
*
* \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
* @lazy
*/
protected $categories;
/**
* MyModel constructor.
@overcome
overcome / nginx.conf
Created August 16, 2017 05:53 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@overcome
overcome / page.meta
Created May 23, 2017 12:04
TypoScript: page.meta
################# Title ############################
config.noPageTitle = 2
page.headerData.5 = TEXT
page.headerData.5.field = subtitle//title
page.headerData.5.noTrimWrap = |<title>Kunden-Name: |</title>|
################# Meta-Tags ########################
page.meta{
keywords.stdWrap.cObject = COA
keywords.stdWrap.cObject {
10 = TEXT