- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
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
// Check Iranian National Code Validity - Clojure, C#, Ruby, JavaScript, Python, Scala, Java 8, PHP, C, Go, Swift, Kotlin | |
// بررسی صحت کد ملی ایران - کلوژر، سیشارپ، روبی، جاوااسکریپت، پایتون، اسکالا، جاوا ۸، پیاچپی، سی، گو، سوئیفت، کاتلین | |
// در نسخههای قبل یکسان بودن اعداد نا معتبر تشخیص داده میشد ولی | |
// اعداد یکسان نامعتبر نیست http://www.fardanews.com/fa/news/127747 | |
// بعضی از پیادهسازیها سریع نیستند، میتوانید نسخهٔ خود را بر پایهٔ | |
// نسخهٔ سی یا گو ایجاد کنید که بهترین سرعت را داشته باشد | |
/** |
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
{ | |
"آ": "⠜", | |
"ا": "⠁", | |
"ب": "⠃", | |
"پ": "⠏", | |
"ت": "⠞", | |
"ث": "⠹", | |
"ج": "⠚", | |
"ﭺ": "⠉", | |
"ح": "⠱", |
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
* change drive name | |
Set-Partition -DriveLetter D -NewDriveLetter E | |
* get time of one command like get-process | |
Measure-Command {Get-Procees} | |
* find exe (or any) format in one directory | |
Get-childitem "C:\Program Files" -recurse | Where-Object {$_.extension -eq ".exe"} | |
* find powershell module install path like PSReadLine | |
(Get-Module -Name PSReadLine).Path |
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/bash | |
echo "Please, enter your username, it will be added to 'sudo' and 'docker' groups during the process." | |
read USERNAME | |
if [ -z "$USERNAME" ] ; then | |
echo "Exiting... Done." | |
exit | |
else | |
echo "Adding user to 'sudo' group..." |
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
Regex | |
========================================================== | |
GET /_search | |
{ | |
"query": { | |
"regexp": { | |
"user": { | |
"value": "k.*y" | |
} |
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
var exec = require('child_process').exec; | |
var targetBranch = process.argv[2] || "develop" | |
var title = process.argv[3] || "initial task" | |
var description = process.argv[4] || "initial task" | |
exec("git push origin HEAD \ | |
-o merge_request.create \ | |
-o merge_request.remove_source_branch \ | |
-o merge_request.title=" + title + " \ |
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
git config --global --add alias.permission-reset '!git diff -p -R --no-color | grep -E "^(diff|(old|new) mode)" --color=never | git apply' | |
// use like git permission-reset |
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
/etc/sysctl.conf | |
vm.dirty_background_ratio = 5 | |
vm.dirty_ratio = 10 | |
* run | |
sudo sysctl -p |
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
// delete all origin branch that deleted from origin and stay in your local | |
git fetch -p | |
// chekout to main brach to prevent delete it from local | |
git checkout master | |
// delete all local branch | |
git branch | xargs git branch -d | |
// delete all origin branch that don't deleted from origin and stay in your local | |
git branch | xargs git branch -D | |
// now you have master branch in local |
OlderNewer