Skip to content

Instantly share code, notes, and snippets.

Michał Czeraszkiewicz czerasz

Block or report user

Report or block czerasz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
czerasz / grafana-dashboards-carousel.html
Last active Jul 28, 2017
Grafana Dashboards carousel/rotator/playlist
View grafana-dashboards-carousel.html

Keybase proof

I hereby claim:

  • I am czerasz on github.
  • I am czerasz ( on keybase.
  • I have a public key whose fingerprint is ED80 21A8 8730 9246 A278 881E D87F 15DA 25AB 9B5D

To claim this, I am signing this object:

czerasz / every-page.html
Last active May 18, 2018
Google Analytics Optout/Disable
View every-page.html
var gaProperty = 'UA-65367173-1';
var gaDisableCookieName = 'ga-disable-' + gaProperty;
// Disable Google Analytics if the user opted for this - this information is saved in the cookie
if ( document.cookie.indexOf(gaDisableCookieName + '=true') === -1 ) {
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
czerasz / server.js
Created Aug 30, 2013
node file upload
View server.js
#!/usr/bin/env node
* jQuery File Upload Plugin Node.js Example 2.1.0
* Copyright 2012, Sebastian Tschan
* Licensed under the MIT license:
czerasz / varnish-jsonp.vcl
Last active Nov 1, 2016 — forked from simonw/varnish-jsonp.vcl
Get Varnish to handle JSONP requests - working example
View varnish-jsonp.vcl
backend jsonp_varnish {
.host = "localhost";
.port = "80";
#------------- begin jsonp functionality -------------#
# How the jsonp_template_backend dispatches to the ESI generating code:
sub jsonp_throw_error_recv {
if (req.url == "/JSONP-ESI-TEMPLATE") {
error 760;
View file-start.rb
#!/bin/env ruby
# encoding: utf-8
czerasz /
Created Oct 1, 2012
varnish commands
# View requests which are comming from the user to varnish
varnishlog -c -i RxURL
# View requests which are going from varnish to the backend
varnishlog -b -i TxURL
# BAN many objects at once - remember to implement the ban functionality in the /etc/varnish/default.vcl
curl -X BAN -H 'Host:' 'http://localhost:80/url/.*'
czerasz / autossh.c
Last active Jul 25, 2016
useful commands
View autossh.c
// Compile with
// gcc -o /etc/bin/autossh autossh.c
#include <stdio.h>
int main(int argc, char *argv[]) {
while(1) {
View .profile
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
# Set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
czerasz / gist:1669316
Created Jan 24, 2012
remove almost all gems
View gist:1669316
gem list | cut -d" " -f1 >> gemslist.txt
#remove from this gems You want to leave
more gemslist.txt | xargs gem uninstall -aIx
You can’t perform that action at this time.