Skip to content

Instantly share code, notes, and snippets.

@lucijafrkovic
lucijafrkovic / autohotkey_script
Created March 22, 2017 14:19
Autohotkey script
; switch left ctrl and alt
; LCtrl::Alt
; LAlt::Ctrl
; win+w - open winamp
#w::
Run "C:\Program Files (x86)\Winamp\winamp.exe"
Return
@lucijafrkovic
lucijafrkovic / git_custom_command_win.md
Last active January 20, 2024 17:57
Add custom git command (Windows)

Creating a custom git command in Windows

  1. create a cmd/bat file with the command. E.g. retag.cmd, save it in C:\git-scripts for example

  2. add your git commands to the file. For example, this set of commands deletes the specified tag from your current branch both locally and remotely, then tags it with the same tag and pushes the change remotely

    git tag -d %1

    git push origin :refs/tags/%1

@lucijafrkovic
lucijafrkovic / git_reset_branch_to_origin
Created June 20, 2016 10:53
git reset branch to origin
git reset --hard origin/branch_name
@lucijafrkovic
lucijafrkovic / git_branch_dev_changes
Created June 6, 2016 09:02
git list all changed files between main branch and another branch
git diff --name-only TARGET_BRANCH $(git merge-base TARGET_BRANCH main_dev_branch)
@lucijafrkovic
lucijafrkovic / docker_cheat_sheet
Last active June 8, 2016 07:26
Docker for Oracle
-- run oracle12c from image
docker run --privileged=true -d -p 32770:1521 --name orcl -i oracle-12c:rc_V_9_6_0
# privileged = true
-- gives extended privileges to the container
# -d
-- detach, Run container in background and print container ID
# -p outside:inside
@lucijafrkovic
lucijafrkovic / git_branch_from_tag
Last active June 21, 2016 09:33
git branch from tag
1. git checkout -b branch_name tag_name
2. git push --set-upstream origin branch_name
or
git push -u origin branch_name
@lucijafrkovic
lucijafrkovic / git_retag
Created April 28, 2016 14:02
Retagging on git
1. list all remote tags
git ls-remote --tags
2. delete local tag
git tag -d V_1_0_1
3. push tag deletion to remote
git push origin :refs/tags/V_1_0_1
4. tag local branch again