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
| #!/bin/bash | |
| if [[ "$#" -ne 1 ]]; then | |
| echo "usage: git show-merged <remote>" | |
| echo | |
| exit 1 | |
| fi | |
| remote="$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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width" /> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react-dom.js"></script> | |
| <title>Hello World</title> | |
| </head> |
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
| #!/bin/bash | |
| SCRIPTROOT="$( cd "$(dirname "$0")" ; pwd -P )" | |
| for f in "$@"; do | |
| NEWFILE="${f:0:${#f} - 4}js" | |
| gsed -f "$SCRIPTROOT/jsonToModule.script" "$f" > "$NEWFILE" | |
| rm "$f" | |
| done |
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
| // ==UserScript== | |
| // @name BitBucket tab size | |
| // @namespace http://mitmaro.ca | |
| // @version 1.0.0 | |
| // @description Converts the diff tab size on BB | |
| // @author Tim Oram | |
| // @match https://bitbucket.org/*/*/pull-requests/*/diff | |
| // @grant none | |
| // ==/UserScript== |
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
| node_modules |
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
| // wrong | |
| if (true) { | |
| someLongFunctionName(/*somelong item like this that requires a second line*/, | |
| /*some other item */); | |
| } | |
| // correct | |
| if (true) { | |
| someLongFunctionName(/*somelong item like this that requires a second line*/, | |
| /*some other item */); |
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
| // some number that when 360 * precision * 100 + 50 * precision won't overflow an integer | |
| // number of positions after the decimal to keep | |
| var digits = 4; | |
| var precision = Math.pow(10, digits); | |
| function combine(x, y, maxydigits) { | |
| x = Math.floor(x * precision); | |
| y = Math.floor(y * precision); | |
| var maxy = Math.pow(10, maxydigits) * precision; | |
| return x * maxy + y; |
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
| var localStorageActionCreator = function(flux, store) { | |
| var _timerId = null; | |
| // only way I can think to get the dispatcher into the timer actions | |
| // which are not real actions | |
| var _dispatch = flux.dispatchBinder.dispatch; | |
| // force save every little bit in case this storage object doesn't get a chance | |
| // to save | |
| setInterval(_persistData, 60 * 1000); |
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
| mkdir website.jekyll | |
| cd website.jekyll | |
| mkdir _layouts _posts | |
| touch _layouts/default.md | |
| touch _posts/2000-01-01-title1.md _posts/2000-01-02-title2.md | |
| cat > index.html << EOF | |
| --- | |
| layout: default | |
| --- | |
| EOF |
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
| package ca.mitmaro.cs4751.a03; | |
| public class Vector { | |
| public static class Vector2D extends Vector { | |
| public Vector2D(Vector v) { | |
| this(v.components[Vector.X], v.components[Vector.Y]); | |
| } | |