Skip to content

Instantly share code, notes, and snippets.

@korczis
korczis / README.md
Last active September 5, 2023 18:37
Card Trick - 673 King Street - Card Order
@korczis
korczis / rubocop-cops.txt
Created April 24, 2014 18:15
List of RuboCop cops
# Available cops (167) + config for /Users/tomaskorcak/dev/gooddata-ruby:
# Type 'Lint' (32):
AmbiguousOperator:
Description: Checks for ambiguous operators in the first argument of a method invocation
without parentheses.
Enabled: true
AmbiguousRegexpLiteral:
Description: Checks for ambiguous regexp literals in the first argument of a method
invocation without parenthesis.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@korczis
korczis / getBrowserPlugins.js
Last active July 24, 2020 12:55
Detect Plugins installed in Browser JSFiddle http://jsfiddle.net/enB3B/
// See JSFiddle
http://jsfiddle.net/enB3B/
var getBrowserPlugins = function(navigator) {
var rdls = function (vals) {
var res = [];
var tmp = vals.sort();
for (var i = 0; i < tmp.length; i++) {
@korczis
korczis / import-data.sh
Last active May 5, 2020 01:47
Import separate json files into couchdb
#! /usr/bin/env bash
# HOWTO
#
# 0. Try this - wget https://gist.githubusercontent.com/korczis/2be371aedfb2575f6b9c/raw/82dd096034ab7a67371bb3aab4b1c3be97477df5/import-data.sh && chmod 755 ./import-data.sh && ./import-data.sh
#
# If the step "0" not works for you try following these steps
#
# 1. download this bash script to firmy.cz
# 2. make sure all data are in subfolder "data"
Last login: Wed Aug 14 10:38:51 on ttys027
korCZis-452069:~ korczis$ cd dev
korCZis-452069:dev korczis$ cd tmp
korCZis-452069:tmp korczis$ git clone git@gitlab.skypicker.com:template-automation/nest-egg-be.git
fatal: destination path 'nest-egg-be' already exists and is not an empty directory.
korCZis-452069:tmp korczis$ rm -rf ./*
korCZis-452069:tmp korczis$ git clone git@gitlab.skypicker.com:template-automation/nest-egg-be.git
Cloning into 'nest-egg-be'...
remote: Enumerating objects: 1505, done.
remote: Counting objects: 100% (1505/1505), done.

Keybase proof

I hereby claim:

  • I am korczis on github.
  • I am korczis (https://keybase.io/korczis) on keybase.
  • I have a public key ASAADjKlRI_2kW2kkTV4PWWYVEbsNdfPdUw-1S5PU3Ko7Ao

To claim this, I am signing this object:

function CheckAdobeVersion() {
var isInstalled = false;
var version = null;
if (window.ActiveXObject) {
var control = null;
try {
// AcroPDF.PDF is used by version 7 and later
control = new ActiveXObject('AcroPDF.PDF');
} catch (e) {
// Do nothing
@korczis
korczis / the-scratch.conf
Created September 7, 2013 13:57
Nginx Node.js Proxy with caching, websockets, gzip
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=cache:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_the_scratch {
server 127.0.0.1:3000 weight=1 fail_timeout=60s;
}
# the nginx server instance
server {