- http://stackoverflow.com/questions/804115 (
rebasevsmerge). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebasevsmerge) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse) - http://stackoverflow.com/questions/292357 (
pullvsfetch) - http://stackoverflow.com/questions/39651 (
stashvsbranch) - http://stackoverflow.com/questions/8358035 (
resetvscheckoutvsrevert)
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
| //https://stackoverflow.com/a/22480938/5400353 | |
| function isScrolledIntoView(el) { | |
| var elemTop = el.getBoundingClientRect().top; | |
| var elemBottom = el.getBoundingClientRect().bottom; | |
| // Only completely visible elements return true: | |
| //var isVisible = (elemTop >= 0) && (elemBottom <= window.innerHeight); | |
| // Partially visible elements return true: | |
| isVisible = elemTop < window.innerHeight && elemBottom >= 0; | |
| return isVisible; |
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
| #!/usr/bin/env python3 | |
| import os | |
| import random | |
| import subprocess | |
| import argparse | |
| parser = argparse.ArgumentParser(description='Število Pujs Pep, ki jih želiš zaigrat') | |
| parser.add_argument('stevilo', metavar='N', type=int, nargs='+', | |
| help='Število filmčkov za zaigrat') |
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
| ' Source: https://wordribbon.tips.net/T009169_Removing_All_Text_Boxes_In_a_Document.html | |
| Sub RemoveTextBox2() | |
| Dim shp As Shape | |
| Dim oRngAnchor As Range | |
| Dim sString As String | |
| For Each shp In ActiveDocument.Shapes | |
| If shp.Type = msoTextBox Then | |
| ' copy text to string, without last paragraph mark |
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 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 |
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
| let img = document.querySelectorAll('img') | |
| // outline does not count in the size of the element, whereas border does. This is why outline is used | |
| img.forEach(x => { if (x.naturalWidth>x.clientWidth) { x.style.outline = "2px solid red"}}) |
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
| # Replaces the replacebelow statement in the text used as a placeholder for what used to be the document pagination | |
| .*?[\*]*?replacebelow[\*]*?\n\n.*?\n | |
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
| // adapted from https://www.simoahava.com/analytics/macro-magic-google-tag-manager/#7 | |
| if ("ga"in window) { | |
| var gaCustom = ga.getAll()[0]; //this retrieves all ga trackers, we get the first one, which is the one we want | |
| if (gaCustom) { | |
| gaCustom.send('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]) //send the event with the proper tracking info | |
| } | |
| } |
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
| methods of overlaying text on images | |
| http://css-tricks.com/design-considerations-text-images/ |