Skip to content

Instantly share code, notes, and snippets.

View dkoudlo's full-sized avatar

Danil Koudlo dkoudlo

View GitHub Profile
@dkoudlo
dkoudlo / helpfull_commands.md
Last active April 12, 2017 22:11
Linux Commands

GIT

create new branch tracking origin/develop

git checkout -b new_branch origin/develop

push new branch to origin

git push -u origin new_branch

Archives

To compress:

tar -zcvf archive_name.tar.gz directory_to_compress

To decompress:
@dkoudlo
dkoudlo / get_branch_names.groovy
Last active March 24, 2017 18:38
Get Git Branches Names - Usefull to run on jenkins
def defaultBranch = 'master'
def sshLinkToRepo = 'ssh://git@github.com/dkoudlo/py-manage-server.git'
def gettags = ("git ls-remote -t -h " + sshLinkToRepo + " refs/heads/*").execute()
def branchNames = [defaultBranch] + gettags.text.readLines().collect { it.split()[1].replaceAll('refs/heads/', '') }
return branchNames.unique()
@dkoudlo
dkoudlo / gist:145bdfa9430120e6f7c1
Last active May 11, 2016 23:31
Handle ssh:// url in Windows 7
# Download and Install Putty https://the.earth.li/~sgtatham/putty/latest/x86/putty-0.67-installer.msi
# Download putty version that can handle urls, reference http://schipka.com/archives/34
# Download files from here http://schipka.com/wp-content/uploads/2008/09/putty_ssh.zip
# Unzip putty.exe and replace it with original C:\Program Files (x86)\PuTTY\putty.exe
# To associate Putty with ssh filetype
# Open command prompt as Administrator
ftype ssh="C:\Program Files (x86)\PuTTY\putty.exe" %1
# Click on ssh://root@1.2.3.4 link in browser it should pop a new putty window up and try to connect,
# good thing to do is to add a default identity file in putty, google it