Skip to content

Instantly share code, notes, and snippets.

View hamzaPixl's full-sized avatar
👨‍💻
Webaholic

pixl hamzaPixl

👨‍💻
Webaholic
View GitHub Profile
@hamzaPixl
hamzaPixl / github_org_stats.py
Created May 16, 2024 18:57 — forked from carsongee/github_org_stats.py
Grab Contributor Statistics for a Given GitHub Organization
#!/usr/bin/env python
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
@hamzaPixl
hamzaPixl / README.md
Created August 15, 2021 17:32
Example readme for personnal webiste, can be used for other projects

[![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url] [![LinkedIn][linkedin-shield]][linkedin-url]

Logo
//--------------------- Copyright Block ----------------------
/*
PrayTimes.js: Prayer Times Calculator (ver 2.3)
Copyright (C) 2007-2011 PrayTimes.org
Developer: Hamid Zarrabi-Zadeh
License: GNU LGPL v3.0
TERMS OF USE:
@hamzaPixl
hamzaPixl / create-pull-request.sh
Last active December 21, 2018 12:44
Create pull request for your branch
to_branch=$1
if [ -z $to_branch ]; then
to_branch="master" # default branch is master you can easily change it
fi
# try the upstream branch if possible, otherwise origin will do
UPSTREAM=$(git config --get remote.upstream.url)
ORIGIN=$(git config --get remote.origin.url)
if [ -z $UPSTREAM ]; then
UPSTREAM=$ORIGIN
@hamzaPixl
hamzaPixl / logger.js
Created December 4, 2018 11:17
Logger js. Using moment and winston
/**
* Usage:
* const logger = require('./logger').init('name');
*
* > logger.info('message logged');
*
*/
const moment = require('moment');
const winston = require('winston');
@hamzaPixl
hamzaPixl / .huskyrc.json
Last active December 4, 2018 11:11
Run test before pushing
{
"hooks": {
"pre-push": "hooks/check-no-console-call.sh && hooks/run-test-prepush.sh"
}
}
@hamzaPixl
hamzaPixl / .huskyrc.json
Last active December 4, 2018 10:59
Put the tag present in the name of the branch in your commit message.
{
"hooks": {
"prepare-commit-msg": "hooks/prepare-commit-msg.sh ${HUSKY_GIT_PARAMS}"
}
}
@hamzaPixl
hamzaPixl / validateSpanishId.js
Last active December 4, 2018 10:31 — forked from afgomez/validate_spanish_id.js
Spanish DNI, CIF, NIE validator
/**
* Returns the type of document and checks its validity.
*
* Usage:
* validate(str);
*
* > validate('kfhdsjf');
* { type: 'UNKNOWN', valid: false }
*
* > validate('12345678Z');