Skip to content

Instantly share code, notes, and snippets.

View egel's full-sized avatar

Maciej Sypien egel

View GitHub Profile
#!/bin/bash
matchbox-keyboard
@egel
egel / pre-commit
Last active March 20, 2017 09:48
Block to commit if user's email not match
#!/bin/sh
#
# 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".
WHITE_LIST=''
#!/bin/bash
_command=$1
AUTHOR="Maciej Sypień <maciejsypien@gmail.com>"
if [ -z "$_command" ]; then
printf "clear|install|uninstall\n"
exit 1
fi

Keybase proof

I hereby claim:

  • I am egel on github.
  • I am egel (https://keybase.io/egel) on keybase.
  • I have a public key ASB3Kr8PUznjDEU8aZvR9gsFDFtaxahivFn5vgs8ttHgTQo

To claim this, I am signing this object:

@egel
egel / pre-push
Last active July 6, 2016 16:49
Git pre-push guardian to prevent push to protected branches.
#!/bin/bash
# General colors
black='\x1B[0;30m'
red='\x1B[0;31m'
green='\x1B[0;32m' # '\e[1;32m' is too bright for white bg.
blue='\x1B[1;34m'
yellow='\x1B[0;33m'
purple='\x1B[1;35m'
cyan='\x1B[0;36m'
@egel
egel / insert_csv_data_to_mysql.sh
Created April 11, 2016 08:29
Simple script that help you to insert multiple csv data into MySQL database table
#!/bin/bash
read -r -p "Type MySQL user (root): " USER
if [ -z "$USER" ]; then
USER=root
fi
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
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
egel / include.html
Created March 4, 2016 10:00 — forked from pmanijak/include.html
Minimal template example with AngularJS
:-)
@egel
egel / index.html
Created March 3, 2016 11:20
Minimal angular example with ui.router
<!doctype html>
<html ng-app="project">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.18/angular-ui-router.min.js"></script>
<script src="scripts.js"></script>
</head>
@egel
egel / README.md
Created February 21, 2016 01:10 — forked from jimothyGator/README.md
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/