$ sudo npm install -g hexo-cli
$ hexo -v
hexo-cli: 0.1.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> openssl rand -base64 6 | |
QBlkom92 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git filter-branch --env-filter ' | |
OLD_EMAIL="old-email" | |
CORRECT_NAME="new-name" | |
CORRECT_EMAIL="new-email" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo curl http://get.sensiolabs.org/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer | |
sudo chmod a+x /usr/local/bin/php-cs-fixer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository | |
# Add the remote, call it "upstream": | |
git remote add upstream https://github.com/whoever/whatever.git | |
# Fetch all the branches of that remote into remote-tracking branches, | |
# such as upstream/master: | |
git fetch upstream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://tech.osteel.me/posts/2015/08/10/how-to-use-the-fork-of-a-repository-with-composer.html | |
{ | |
"name": "osteel/myproject", | |
"description": "My project.", | |
"license": "MIT", | |
"type": "project", | |
"repositories": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server | |
git init --bare --shared | |
Local | |
git init | |
git remote add origin ssh://user@ip/.../server | |
git add .gitignore | |
git commit -m "first commit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/git-tips/tips | |
https://eric.blog/2014/05/11/remove-files-from-git-addingupdating-gitignore/ | |
git rm --cached <file> | |
git rm -r --cached . | |
git add -A | |
git commit -am 'Removing ignored files' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- An individual repo : | |
git config user.name "Your Name Here" | |
git config user.email your@email.com | |
- Global configuration : | |
git config --global user.name "Your Name Here" | |
git config --global user.email your@email.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Gedmo\Sluggable\Util\Urlizer; | |
Urlizer::urlize($text, $separator = '-'); |
NewerOlder