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 . -depth -type d -name target -exec rm -rf {} + |
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
| ssh-keygen -f "/home/xxxx/.ssh/known_hosts" -R "xxx.com" |
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
| convert xxx.png -fuzz 75% -fill red -opaque white xxx_red.png |
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
| ssh -C2TnN -D 1080 [email protected] |
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
| seq 10000 | parallel -n0 -j100 "curl -s --header "Connection: keep-alive" "http://localhost:9000" > /dev/null" |
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
| export class supports { | |
| static classList(): boolean { | |
| return 'classList' in document.documentElement | |
| } | |
| } | |
| export class cls { | |
| static has(el: HTMLElement, className: string): boolean { | |
| if (supports.classList()) { |
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
| cat /var/log/logifle | grep -Po 'connection timed out: \K.*\w+(?= to)' | sort | uniq -c |
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
| export const request = (url) => { | |
| const xhr = new XMLHttpRequest() | |
| const process = (method, body) => { | |
| xhr.open(method, url, true) | |
| xhr.setRequestHeader('Content-Type', 'application/json;charset=UTF-8') | |
| xhr.send(body) | |
| return new Promise((resolve, reject) => { | |
| xhr.onreadystatechange = xhr.onerror = () => { | |
| if (xhr.readyState === XMLHttpRequest.DONE) xhr.status >= 200 && xhr.status < 300 ? | |
| resolve(JSON.parse(xhr.responseText)) : reject(xhr.responseText) |
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
| Control-U β pages up | |
| Control-D β pages up | |
| ^ β goes to the beginning of a line | |
| $ β goes to the end of a line | |
| g β goes to the beginning of scroll history | |
| G β goes to the end of scroll history | |
| / β search down | |
| ? β search up |
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
| ((root, props) -> | |
| relayEvent = -> | |
| a = _.chain(arguments).toArray() | |
| a.unshift(@) if a.size().value() is 2 | |
| ((from, to, eventName) -> | |
| from.on(eventName, -> | |
| a = _.chain(arguments) | |
| .toArray() | |
| .unshift(eventName) | |
| to.trigger.apply(to, a.value()) |
NewerOlder