get git remote url as https
. Whatever your remote Git repository settings are.
use it :
- for github.com repo :
git-remote-http.sh
get first repo https url as ordered by git.git-remote-http-all.sh
get all repo https url as ordered by git.
<?php | |
/** | |
* @see https://gist.github.com/DHS/1340150 | |
**/ | |
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guine |
/* cin email password phone username */ | |
/^((([a-zA-Z]|[0-9])|([-]|[_]|[.]))+[@](([a-zA-Z0-9])|([-])){2,63}[.](([a-zA-Z0-9]){2,63})+)|(([_a-zA-Z0-9]+){3,20})|(\+?\d{1,4}?[-.\s]?\(?\d{1,3}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9})$/gm | |
/*cin*/ | |
/^([0-9]){8}$/ | |
/*username*/ | |
/^([_a-zA-Z0-9]+){3,20}$/gm | |
/*password*/ |
//phantomjs-full-example.js | |
var system = require('system'); | |
var fs = require('fs'); | |
var process = require("child_process"); | |
var spawn = process.spawn; | |
var execFile = process.execFile; | |
var webPage = require('webpage'); | |
var page = webPage.create(); |
yarn add shrink-ray@* | |
yarn add v1.17.3 | |
[1/6] Validating package.json... | |
[2/6] Resolving packages... | |
warning shrink-ray > node-zopfli > node-pre-gyp > hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. | |
warning shrink-ray > node-zopfli > node-pre-gyp > request > hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. | |
warning shrink-ray > node-zopfli > node-pre-gyp > hawk > boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). | |
warning shrink-ray > node-zopfli > node-pre-gyp > hawk > cryptiles@2.0.5: This version has been dep |
yarn add shrink-ray@* | |
yarn add v1.17.3 | |
[1/6] Validating package.json... | |
[2/6] Resolving packages... | |
warning shrink-ray > node-zopfli > node-pre-gyp > hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. | |
warning shrink-ray > node-zopfli > node-pre-gyp > request > hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. | |
warning shrink-ray > node-zopfli > node-pre-gyp > hawk > boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). | |
warning shrink-ray > node-zopfli > node-pre-gyp > hawk > cryptiles@2.0.5: This version has been dep |
REGEDIT4 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FirefoxPortable.exe] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FirefoxPortable.exe\shell] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FirefoxPortable.exe\shell\open] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FirefoxPortable.exe\shell\open\command] |
/* https://stackoverflow.com/a/49434126 */ | |
.CodeMirror { | |
resize : vertical !important; | |
overflow : auto !important; | |
} |
#!/usr/bin/env -S bash -euo pipefail | |
get_github_repo_size() { | |
if [[ "$1" == "--help" || "$1" == "-h" ]]; then | |
echo "Usage: get_github_repo_size [OPTIONS] {GITHUB_REPO_URLS...}" | |
echo | |
echo "Retrieve and display the sizes of GitHub repositories." | |
echo "The function will automatically use the GITHUB_TOKEN if it's set as an environment variable." | |
echo |
Automatically load ssh keys : Add to .bashrc and configure environment variable.
export SSH_DIR="${HOME}/.ssh"
command mkdir -p "${SSH_DIR}"
if [[ -z "${SSH_AUTH_SOCK:-}" ]] ; then
eval "$(ssh-agent -s)" >/dev/null 2>&1
export SSH_AUTH_SOCK="${SSH_AUTH_SOCK}"
fi
export SSH_AGENT_LIFE=14400 # 4 hours