This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This pre-commit hook looks for `fdescribe`, `fcontext`, `fit`, `fspecify` and `fexample` in the | |
# staged files and exits with an error code of 1 if there are such changes. | |
# | |
STATUS=0 | |
for focus in fdescribe fcontext fit fspecify fexample; do | |
FILES=$(git diff --staged -G"^\s*$focus\(" --name-only | wc -l) | |
if [ $FILES -gt 0 ] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brendand@brendand-T450:~$ cat algo.py | |
L = list(range(1000000)) | |
LS = set(L) | |
def findit(): | |
if 500000 in L: | |
pass | |
def findset(): | |
if 500000 in LS: | |
pass |