Skip to content

Instantly share code, notes, and snippets.

Avatar

Maciej Sypień egel

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

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 Jul 6, 2016
Git pre-push guardian to prevent push to protected branches.
View pre-push
#!/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 Apr 11, 2016
Simple script that help you to insert multiple csv data into MySQL database table
View insert_csv_data_to_mysql.sh
#!/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 Mar 4, 2016
angular-lodash provider
View angular-lodash.js
'use strict';
function _lodashProvider() {
return {
$get: function($window) {
function _getLodash() {
return $window._
}
return {
@egel
egel / include.html
Created Mar 4, 2016 — forked from pmanijak/include.html
Minimal template example with AngularJS
@egel
egel / index.html
Created Mar 3, 2016
Minimal angular example with ui.router
View index.html
<!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 Feb 21, 2016 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
View README.md
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/