Skip to content

Instantly share code, notes, and snippets.

View isevcik's full-sized avatar

Ivan Sevcik isevcik

View GitHub Profile
#!/usr/bin/env python3
import glob
import fileinput
from pathlib import Path
directory = "src/app/"
directory_blacklist = "styles/"
if_matches = [
// ==UserScript==
// @name Youtube - remove autoplay in user chanel
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.youtube.com/channel/*
// @match https://www.youtube.com/user/*
// @grant none
// ==/UserScript==
# history tunning
export export HISTSIZE=50000
export HISTTIMEFORMAT="%h %d %H:%M:%S "
PROMPT_COMMAND='history -a'
export HISTCONTROL=ignorespace
# GIT
alias gdp="git checkout dev && git pull"
#alias gmp="git checkout master && git pull"
alias gs="git status"
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2019-01-31 14:58:50" build="180206">
<value name="ColorTable00" type="dword" data="00222827"/>
<value name="ColorTable01" type="dword" data="009e5401"/>
<value name="ColorTable02" type="dword" data="0004aa74"/>
<value name="ColorTable03" type="dword" data="00a6831a"/>
<value name="ColorTable04" type="dword" data="003403a7"/>
<value name="ColorTable05" type="dword" data="009c5689"/>
@isevcik
isevcik / scan-ap.lua
Created December 12, 2017 22:33
esp8266 nodeMCU script for scanning available Wifi APs
return function (connection, req, args)
dofile('httpserver-header.lc')(connection, 200, 'html')
function ca(payload) connection:send(payload) end
ca("<script>setTimeout(function(){window.location=window.location}, 4000)</script>")
aplist = aplist or {}
ca("<table>")
ca("<tr>")
@isevcik
isevcik / led-toggle.lua
Created December 10, 2017 15:57
esp8266 nodeMCU script
return function (connection, req, args)
dofile('httpserver-header.lc')(connection, 200, 'html')
led1 = {}
led1.pin = 0
led1.value = gpio.LOW;
led2 = {}
led2.pin = 4
led2.value = gpio.HIGH
“Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function.”
~ John Carmack
#!/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=()
@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"
@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);
}
?>