Skip to content

Instantly share code, notes, and snippets.

Avatar
🐙
Octopus is a friend, not food.

Petr Peller Elijen

🐙
Octopus is a friend, not food.
View GitHub Profile
View config.ovpn
client
dev tap
proto udp
remote vpn.fel.cvut.cz
port 1196
resolv-retry infinite
nobind
View gist:a149b9f488932a370c248027b4e515ce
<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>
View spacers.css
.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 Apr 15, 2016
Automatically push, create PR and assign team members for review
View pr.sh
#!/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 Jan 6, 2016
aliases for git fixup/rebase workflow
View alias.sh
alias gfu="git commit --fixup"
alias gfuh="git commit --fixup HEAD"
alias gria="git rebase -i --autosquash"
@Elijen
Elijen / bootstrap.sh
Last active Aug 29, 2015
webdev's shell script for fast re-install after a drive format (OS X)
View bootstrap.sh
#!/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 ]
View alert.js
<script>alert();</script>
View render_template.php
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 Apr 11, 2013
Export from MySQL to CSV directly
View export.sql
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