Skip to content

Instantly share code, notes, and snippets.

View Elijen's full-sized avatar
🐙
Octopus is a friend, not food.

Petr Peller Elijen

🐙
Octopus is a friend, not food.
View GitHub Profile
@Elijen
Elijen / config.ovpn
Created March 27, 2020 21:20
CVUT FEL VPN
client
dev tap
proto udp
remote vpn.fel.cvut.cz
port 1196
resolv-retry infinite
nobind
<html lang="en"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>17-01-2019</title>
<style>
body {
font-family: Open Sans, sans-serif;
}
</style>
.p-a-xsm,.p-t-xsm,.p-y-xsm{padding-top:5px}
.p-a-xsm,.p-b-xsm,.p-y-xsm{padding-bottom:5px}
.p-a-xsm,.p-l-xsm,.p-x-xsm{padding-left:5px}
.p-a-xsm,.p-r-xsm,.p-x-xsm{padding-right:5px}
.m-a-xsm,.m-t-xsm,.m-y-xsm{margin-top:5px}
.m-a-xsm,.m-b-xsm,.m-y-xsm{margin-bottom:5px}
.m-a-xsm,.m-l-xsm,.m-x-xsm{margin-left:5px}
.m-a-xsm,.m-r-xsm,.m-x-xsm{margin-right:5px}
@media only screen and (max-width:992px){.p-a-xsm-sm,.p-t-xsm-sm,.p-y-xsm-sm{padding-top:5px!important}
.p-a-xsm-sm,.p-b-xsm-sm,.p-y-xsm-sm{padding-bottom:5px!important}
@Elijen
Elijen / pr.sh
Created April 15, 2016 14:18
Automatically push, create PR and assign team members for review
#!/bin/bash -ex
UNCOMMITED_CHANGES=$(git diff-index --name-only HEAD --)
if [ -n "$UNCOMMITED_CHANGES" ]; then
echo "Repo has uncommited changes, proceed anyway? (y/N)"
read FORCE
if [ "$FORCE" = "y" -o "$FORCE" = "Y" ]; then
echo "Continuing..."
else
@Elijen
Elijen / alias.sh
Last active January 6, 2016 13:53
aliases for git fixup/rebase workflow
alias gfu="git commit --fixup"
alias gfuh="git commit --fixup HEAD"
alias gria="git rebase -i --autosquash"
@Elijen
Elijen / bootstrap.sh
Last active August 29, 2015 14:25
webdev's shell script for fast re-install after a drive format (OS X)
#!/bin/bash
# This script installs and configures 3rd party apps that are not available from App Store
# and does small OS tweak such as changing Terminal promt or removing default Dock icons.
# Tested for OS X Yosemite 10.10.4
# install command line tools
xcode-select --install
if [ `xcode-select -p` != 0 ]
@Elijen
Elijen / alert.js
Last active August 29, 2015 14:01
<script>alert();</script>
public function renderTemplate($templatePath /* $data = array(), $echo = false */) {
ob_start();
extract((array)@func_get_arg(1));
require __DIR__ . "/template_helpers.php";
require __DIR__ . "/" . $templatePath;
result = ob_get_clean();
if(@func_get_arg(2)) {
echo $result;
} else {
@Elijen
Elijen / export.sql
Created April 11, 2013 09:51
Export from MySQL to CSV directly
SELECT id, name, email INTO OUTFILE '/tmp/result.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
ESCAPED BY ‘\\’
LINES TERMINATED BY '\n'
FROM users WHERE 1