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
| // Run this in the console just before the countdown timer goes from "1" to "9" | |
| // then wiggle the mouse over the text input | |
| // (it helps if you zoom in in the browser to increase the input element size) | |
| var charsPerIteration = 5; | |
| var maxPressesPerSecond = 32; | |
| var charsBeforeBackoff = 20; | |
| var backoffDelayPerChar = 50; | |
| var textElems = [].slice.call($("[unselectable='on']").parentNode.children); |
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
| on run {input, parameters} | |
| global currentProcess | |
| tell application "System Events" | |
| --set currentProcess to the name of the first process where it is frontmost | |
| set currentProcess to (path to frontmost application as text) | |
| end tell | |
| activate application "VirtualBoxVM" | |
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
| # File | |
| echo 'A' > test-file | |
| echo 'B' >> test-file | |
| perl -i -0 -pe 's/A\nB/REPLACEMENT/g' test-file |
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
| defprotocol P do | |
| def x(p) | |
| end | |
| defimpl P, for: Integer do | |
| def x(p) do | |
| p + 1 | |
| 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
| find * | xargs rename -n 's/part-of-filename-to-replace/replacement/' # -n for dry run |
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
| # Dry run, print out results | |
| find * -type f | xargs perl -0p -e 's/from/to/g' | |
| # Do replace in files | |
| find * -type f | xargs perl -0pi -e 's/from/to/g' |
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
| defmodule AssignPipe do | |
| # Source: https://groups.google.com/forum/#!topic/elixir-lang-core/SJUgN5enNhc | |
| defmacro value ~> var do | |
| {:=, [line: 1], [var, value]} | |
| end | |
| end | |
| defmodule Test do | |
| import AssignPipe |
NewerOlder