- 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
| ## For a beginner-friendly version of the following (more advanced users likely will get better use of the below, | |
| ## if you're just starting out...), see this new gist: | |
| ## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd | |
| This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D | |
| at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward. | |
| ## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide. |
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 python | |
| """ | |
| A local 'statsd' server for dev purposes | |
| """ | |
| from __future__ import print_function | |
| import socket | |
| import sys | |
| def main(port): |
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
| """ | |
| Context manager for environment variables | |
| Usage: | |
| os.environ['MYVAR'] = 'oldvalue' | |
| with EnvironmentContex(MYVAR='myvalue', MYVAR2='myvalue2'): | |
| print os.getenv('MYVAR') # Should print myvalue. | |
| print os.getenv('MYVAR2') # Should print myvalue2. |
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
| # if you want to render flamegraphs | |
| gem "stackprof", require: false # required by flamegraph | |
| gem "flamegraph", require: false |
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
| module FactoryGirl | |
| module Doctor | |
| module FloatDuration | |
| refine Float do | |
| def duration | |
| t = self | |
| format("%02d:%02d.%03d", t / 60, t % 60, t.modulo(1) * 1000) | |
| end | |
| end | |
| end |
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
| # MWS API docs at http://docs.developer.amazonservices.com/en_US/orders-2013-09-01/Orders_Datatypes.html#Order | |
| # MWS Scratchpad at https://mws.amazonservices.com/scratchpad/index.html | |
| # Boto docs at http://docs.pythonboto.org/en/latest/ref/mws.html?#module-boto.mws | |
| from boto.mws.connection import MWSConnection | |
| ... | |
| # Provide your credentials. | |
| conn = MWSConnection( |
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 python | |
| import logging | |
| import socket | |
| import sys | |
| import threading | |
| import paramiko | |
| logging.basicConfig() | |
| logger = logging.getLogger() |
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
| " Share clipboards between vim and tmux without xsel or xclip (which require X and | |
| " X forwarding with SSH) and without changing tmux shortcuts. Requires only tail. | |
| " | |
| " Great for an ssh session to you linode or droplet. | |
| " | |
| " Uses z buffer in vim and writes output to ~/.clipboard and then to tmux's paste | |
| " buffer, and reads it back in cleanly for putting (puddin'). | |
| " | |
| " NOTE: tmux has an undocumented command limit! https://github.com/tmux/tmux/issues/254 | |
| " this means if you mean to copy larger bits of code (entire functions) tmux will |
NewerOlder