- 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)
🔵
- GitHub Staff
- https://terkel.com
- @terkelg
- @terkel.com
- in/terkelg
- terkelg
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
| const delay = (callback, duration) => { | |
| const tick = () => | |
| getProgress(time) < 1 ? requestAnimationFrame(tick) : callback(); | |
| const time = { | |
| duration, | |
| id: requestAnimationFrame(tick) | |
| }; | |
| }; |
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
| import _ from 'underscore'; | |
| export default class TextureAtlas { | |
| constructor(json, image) { | |
| this._textures = {}; | |
| let texture = new THREE.Texture(image); | |
| texture.needsUpdate = true; | |
| let frames = json.frames; | |
| _.keys(frames).forEach(function(key, i) { |
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
| //--------------------------------------------------------------------------// | |
| // Flow field animator by Etienne Jacob (www.necessary-disorder.tumblr.com) // | |
| // Processing code (https://processing.org) // | |
| // Saves frames, then you must use something else to make the GIF // | |
| //--------------------------------------------------------------------------// | |
| /// This code starts with the rendering system I took from @beesandbombs | |
| /// (it also contains some useful functions and stuff) | |
| /// You don't have to understand it | |
| /// Just know that it does an average on many drawings to get a motion blur effect | |
| /// from drawings parametrized by the global variable t going from 0 to 1 |
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
| #![feature(lang_items)] | |
| #![no_std] | |
| #[no_mangle] | |
| pub fn add_one(x: i32) -> i32 { | |
| x + 1 | |
| } | |
| // needed for no_std |
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
| vec2 rotateUV(vec2 uv, float rotation) | |
| { | |
| float mid = 0.5; | |
| return vec2( | |
| cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid, | |
| cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid | |
| ); | |
| } | |
| vec2 rotateUV(vec2 uv, float rotation, vec2 mid) |
I recently tried out the fantastic vim-tmux-navigator tmux plugin.
Unfortunately, some the default key bindings conflict with some of the key bindings my fuzzy finder of choice uses.
I wanted to remap them to the default vim split navigation commands that are prefixed with C-w, and found the solution of
hjdivad in his gist. However, I wanted a simpler solution, so after
some more digging I stumbled upon this reddit post
and ultimately came up with the following solution, which doesn't rely on key bindings that unbind themselves, but uses tmux's
'key-tables'.