Skip to content

Instantly share code, notes, and snippets.

View finchandfriends's full-sized avatar

Marcin finchandfriends

View GitHub Profile
$('.checkcheck').change(function() {
var checked = $('.checkcheck:checked').length;
if(checked !== 0) {
$('#exampleRadioSwitch1').prop('checked',true)
} else {
$('#exampleRadioSwitch1').prop('checked',false)
}
});
@finchandfriends
finchandfriends / pre-commit
Created March 14, 2018 22:02 — forked from fdemiramon/pre-commit
Pre-commit hook for git with phpcs and phpcbf (auto-correct obvious violations)
#!/bin/sh
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
# Determine if a file list is passed
if [ "$#" -eq 1 ]
then
oIFS=$IFS
IFS='
alias gs="git status"
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(blue)<%an>%Creset' --abbrev-commit"
alias ga="git add"
alias gaa="git add ."
alias gc="git commit -m"
alias gca="git commit --amend"
alias gb="git branch"
alias gch="git checkout"
alias gp="git push"
alias gpm="git push origin master"