Skip to content

Instantly share code, notes, and snippets.

View tgezginis's full-sized avatar

Tolga Gezginiş tgezginis

View GitHub Profile
@SametAylak
SametAylak / git_day.sh
Last active July 31, 2018 05:45
This script shows your commits of today. this script searches all subfolders/repos
#!/bin/bash
YELLOW="\\033[1;33m"
RED="\\033[0;31m"
NC="\\033[0m"
PARENT_DIR=$(pwd)
find "$PARENT_DIR" -type d -name ".git"| while read -r line; do
TARGET_FOLDER=$(cd "$line/.." || exit; pwd)
TARGET_FOLDER_NAME=$(basename "$TARGET_FOLDER")
@joom
joom / idValidate.hs
Created November 15, 2014 21:39
Republic of Turkey ID number validity checker
import Data.List (partition)
import Control.Arrow ((***))
idValidate n = (length ds == 11) && check1 && check2
where ds = map (\x -> read [x] :: Int) (show n)
(o, e) = map snd *** map snd $ partition (\(x,_)->odd x) $ zip [1..9] ds
check1 = ds !! 9 == (sum o * 7 - sum e) `mod` 10
check2 = ds !! 10 == sum (init ds) `mod` 10
@thoop
thoop / .htaccess
Last active November 13, 2024 20:20
Official prerender.io .htaccess for Apache.
# Change YOUR_TOKEN to your prerender token
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On