Skip to content

Instantly share code, notes, and snippets.

View egel's full-sized avatar

Maciej Sypien egel

View GitHub Profile
egel / pre-commit
Last active March 20, 2017 09:48
Block to commit if user's email not match
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
# To enable this hook, rename this file to "pre-commit".
AUTHOR="Maciej Sypień <>"
if [ -z "$_command" ]; then
printf "clear|install|uninstall\n"
exit 1

Keybase proof

I hereby claim:

  • I am egel on github.
  • I am egel ( on keybase.
  • I have a public key ASB3Kr8PUznjDEU8aZvR9gsFDFtaxahivFn5vgs8ttHgTQo

To claim this, I am signing this object:

egel / pre-push
Last active July 6, 2016 16:49
Git pre-push guardian to prevent push to protected branches.
# General colors
green='\x1B[0;32m' # '\e[1;32m' is too bright for white bg.
egel /
Created April 11, 2016 08:29
Simple script that help you to insert multiple csv data into MySQL database table
read -r -p "Type MySQL user (root): " USER
if [ -z "$USER" ]; then
read -r -p "Type MySQL $USER password: " PASS
read -r -p "Type MySQL database name: " DBNAME
read -r -p "Type MySQL database table: " DBTABLE
egel / angular-lodash.js
Created March 4, 2016 11:29
angular-lodash provider
'use strict';
function _lodashProvider() {
return {
$get: function($window) {
function _getLodash() {
return $window._
return {
egel / include.html
Created March 4, 2016 10:00 — forked from pmanijak/include.html
Minimal template example with AngularJS
egel / index.html
Created March 3, 2016 11:20
Minimal angular example with ui.router
<!doctype html>
<html ng-app="project">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<script src=""></script>
<script src=""></script>
<script src="scripts.js"></script>
egel /
Created February 21, 2016 01:10 — forked from jimothyGator/
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/