A Pen by Lingjia Liu on CodePen.
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
| .container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center | |
| } | |
| .caption{width:640px;padding:20px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#efefef;font-family:'Source Code Pro', Menlo, Consolas, Monaco, monospace | |
| } | |
| .grid{pointer-events:none | |
| } | |
| .handle{cursor:pointer;fill:white | |
| } |
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
| #------------------------------------------------------------------------------ | |
| # Entry | |
| #------------------------------------------------------------------------------ | |
| main -> _ level6 _ | |
| {% ([ ,value, ]) => value %} | |
| #------------------------------------------------------------------------------ | |
| # Helpers |
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 messages = ['★', '☆'] | |
| var inputEl = document.querySelector('#hc-message-input'); | |
| var inputEvent = document.createEvent("Events"); | |
| inputEvent.initEvent("input", true, true); | |
| var enterEvent = document.createEvent("Events"); | |
| enterEvent.initEvent("keydown", true, true); | |
| enterEvent.which = 13; | |
| enterEvent.keyCode = 13; |
convert -auto-orient /path/to/images
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 | |
| process() { | |
| dir=$@ | |
| echo "processing $dir/" | |
| FILES=$@/* | |
| IFS=$(echo -en "\n\b") | |
| for file in $FILES; do | |
| if [ -f "$file" ]; then |
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
| function isChinese(s, ci) | |
| local lower = { 228, 184, 128 } -- 0x4E00 | |
| local middl = { 224, 128, 128 } | |
| local upper = { 233, 190, 165 } -- 0x9FA5 | |
| for i, v in ipairs(lower) do | |
| local c = s[ci + i - 1] | |
| if c < v then | |
| return false | |
| elseif c > v then | |
| break |
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
| function this.Volume2DB(vol) | |
| vol = math.max(math.epsilon, vol) | |
| return 20 * math.log(vol, 10) | |
| 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
| var path = require("path"); | |
| var args = process.argv.slice(2); | |
| var inputFile = args[0] || "sample.json"; | |
| var courseData = require(path.resolve(inputFile)); | |
| var Node = function(name) { | |
| this.name = name; | |
| this.inDegrees = 0; | |
| this.afterEdges = []; | |
| } |
$ jhead -ta+h:mm file.jpg