Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console | |
текст |
text2224e |
Lorem ipsum dolor sit amet, consectetur adipiscing elit | |
#include <iostream> | |
#include <cstdlib> // для system | |
using namespace std; | |
int main() | |
{ | |
cout << "Hello, world!" << endl; | |
system("pause"); // Только для тех, у кого MS Visual Studio | |
return 0; | |
} |
const Component = React.createClass({ | |
// Метод вызовется перед установкой компонента в DOM | |
componentWillMount() { | |
console.log('I\'m going into DOM'); | |
}, | |
// Метод вызовется после установки компонента в DOM | |
componentDidMount() { |
git config --global alias.co checkout | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global alias.br branch | |
git config --global alias.hist 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short' | |
git config --global alias.type 'cat-file -t' | |
git config --global alias.dump 'cat-file -p' |
function declOfNum(number, titles) { | |
cases = [2, 0, 1, 1, 1, 2]; | |
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
} | |
use: | |
declOfNum(count, ['найдена', 'найдено', 'найдены']); |
git fetch --all | |
git reset --hard origin/master |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |