Skip to content

Instantly share code, notes, and snippets.

View PhillipMwaniki's full-sized avatar
🤓
Who's checking ...

Phillip Mwaniki Nzuli PhillipMwaniki

🤓
Who's checking ...
View GitHub Profile
@PhillipMwaniki
PhillipMwaniki / kenyanMobilePhoneRegEx.txt
Created December 4, 2016 17:26 — forked from morrismukiri/kenyanMobilePhoneRegEx.txt
Kenyan phone number regular expression
/(0|\+?254)7([0-3|7])(\d){7}/
@PhillipMwaniki
PhillipMwaniki / countries.sql
Created July 23, 2018 09:48 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@PhillipMwaniki
PhillipMwaniki / fix-git-line-endings
Created August 6, 2018 09:24 — forked from ajdruff/fix-git-line-endings
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
#!/bin/bash
# Made by st0rmis
# Get the last tag, increment major, minor or patch version and push it
declare -a valid_versions=('major' 'minor' 'patch')
CURTAG=`git fetch --tags && git tag -l --sort=-creatordate | head -1`
CURTAG="${CURTAG/v/}"
IFS='.' read -a vers <<< "$CURTAG"