This file contains hidden or 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 checkout origin/master <path> |
This file contains hidden or 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 show <commit-sha> -- <file> | git apply -R |
This file contains hidden or 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
To remove a submodule you need to: | |
- Delete the relevant section from the .gitmodules file. | |
- Stage the .gitmodules changes git add .gitmodules | |
- Delete the relevant section from .git/config. | |
- Run git rm --cached path_to_submodule (no trailing slash). | |
- Run rm -rf .git/modules/path_to_submodule (no trailing slash). | |
- Commit git commit -m "Removed submodule " | |
- Delete the now untracked submodule files rm -rf path_to_submodule |
This file contains hidden or 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
1- Install | |
brew install bash | |
2- List bashes | |
$ which -a bash | |
/usr/local/bin/bash | |
/bin/bash | |
3- Check versions | |
$ /usr/local/bin/bash --version | |
GNU bash, version 5.0.0(1)-release (x86_64-apple-darwin18.2.0) ... | |
$ /bin/bash --version |
This file contains hidden or 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
//file: provider.tf | |
provider "aws" { | |
region = "us-east-1" | |
} | |
//file: vpc.tf | |
variable "vpc_name" {} | |
data "aws_vpc" "selected" { | |
tags = { |
This file contains hidden or 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
Prune all branches locally not existing in remote in Git: | |
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done |
This file contains hidden or 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
#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted |
This file contains hidden or 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
Search by timestamp: | |
timestamp:["2014-12-01 00:00:00.000" TO "2014-12-31 00:00:00.000"] |
This file contains hidden or 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
(defn extract-names [seq] | |
(for [lib seq :let [dot-index (.indexOf lib ".")]] | |
(subs lib 0 (- dot-index 2)))) | |
;(println (extract-names ["x-security-1.0.7.jar" "aksis-1.0.jar" "antlr-2.7.6.jar"])) | |
(defn dups [seq] | |
(for [[id freq] (frequencies seq) ;; get the frequencies, destructure | |
:when (> freq 1)] ;; this is the filter condition |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"time" | |
"math/rand" | |
) | |
const ( | |
CUTTING_TIME = 20 |
NewerOlder