Skip to content

Instantly share code, notes, and snippets.

View isevcik's full-sized avatar

Ivan Sevcik isevcik

View GitHub Profile
jQuery('.members_download a:first-child').each(function(i, e)
{
var _iframe_dl = $('<iframe />')
.attr('src', e.href)
.hide()
.appendTo('body');
}
);
@isevcik
isevcik / sort-shoes.js
Last active April 7, 2016 17:36
Sort Shoes
// ==UserScript==
// @name Sort Shoes
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.bata.cz/*
// @grant none
// @grant GM_registerMenuCommand
// ==/UserScript==
{
"ignored_packages":
[
"Vintage"
],
"ensure_newline_at_eof_on_save": true,
"trim_trailing_white_space_on_save": true,
}
[
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
// skip cursor after autocompleted })" with TAB
{ "keys": ["tab"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)'}\"\\]]", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
// Add !important to lines missing it
\;(?<!important\;)$
# access logs grep filter out bots
alias ag='grep -v \
-e SeznamBot \
-e Googlebot \
-e seoscanners \
-e SiteExplorer \
-e bingbot \
-e heritrix \
-e Baiduspider \
-e "wp-cron" \
@isevcik
isevcik / list.php
Created December 25, 2016 16:21
List directories in parent directory of current PHP file
<?php
if ($handle = opendir('..')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "<a href='http://$entry." . basename(dirname(dirname(__FILE__))) . "'>$entry</a><br>";
}
}
closedir($handle);
}
?>
@isevcik
isevcik / .bashrc
Last active June 1, 2018 12:59
git for windows .bashrc
alias cdd="cd ~/Documents/swdev"
alias cds="cd src/Web/Website/"
# GIT
alias gdp="git checkout develop && git pull"
alias gmp="git checkout master && git pull"
alias gs="git status"
alias gd="git diff -w"
alias gdc="git diff -w --cached"
alias ga="git add . && git status"
#!/bin/bash
# Transfering OpenVPN profile (.ovpn file) with all required certificate files into mobile device
# like iPhone or Android can be sometimes tricky. This script will embed all these ca, crt and key files
# into specified .ovpn profile file. Then you can transfer just this .ovpn file into your device.
# Since the .ovpn file will contain the key, it should be kept confidental.
#
# Usage: ./ovpn-append-cert.sh --ca ca.crt --crt client.crt --key client.key client.ovpn
POSITIONAL=()
“Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function.”
~ John Carmack