create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| [{ "Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", "Country": "Afghanistan", "ISO": "AF", "Format": "NNNN", "Regex": "^\\d{4}$"}, { "Note": "With Finland, first two numbers are 22.", "Country": "Åland Islands", "ISO": "AX", "Format": "NNNNN", "Regex": "^\\d{5}$"}, { "Note": "Introduced in 2006, gradually implemented throughout 2007.", "Country": "Albania", "ISO": "AL", "Format": "NNNN", "Regex": "^\\d{4}$"}, { "Note": "First two as in ISO 3166-2:DZ", "Country": "Algeria", "ISO": "DZ", "Format": "NNNNN", "Regex": "^\\d{5}$"}, { "Note": "U.S. ZIP codes (range 96799)", "Country": "American Samoa", "ISO": "AS", "Format": "NNNNN (optionally NNNNN-NNNN or NNNNN-NNNNNN)", "Regex": "^\\d{5}(-{1}\\d{4,6})$"}, { "Note": |
| <?php | |
| /** | |
| * @package Joomla.Cli | |
| * | |
| * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. | |
| * @license GNU General Public License version 2 or later; see LICENSE.txt | |
| */ | |
| // Make sure we're being called from the command line, not a web interface | |
| if (PHP_SAPI !== 'cli') |
| <?php | |
| /** | |
| * This script is intented to give real life example and written based on expereience of company. | |
| * | |
| * @package Company.Rules | |
| * | |
| * Copyright (c) 2009-2016 Gunjan Patel<http://www.gunjanpatel.info> | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| * |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
$document = JFactory::getDocument();
// Store document script in variable
$scripts = $document->_scripts;
// Clean document script head temporary
unset($document->_scripts);
// Find the redshop js to shift it upYou can enable short commands by updating your home .gitconfig file.
Goto /home/{user}/.gitconfig file and add contents from https://gist.github.com/gunjanpatel/10019184 file.
touch ~/.git-completion.bash
touch ~/.git-prompt.sh
<?php
$string = 'Hello $ World/';
$username = JFilterInput::getInstance()->clean($string, 'USERNAME');