A collection of freaking awesome HTML5 demos (work in progress).
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
| content |
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
| Hello World! |
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
| // Immutable | |
| import { fromJS } from 'immutable' | |
| const args = fromJS(nopt(Command.DETAILS.options, Command.DETAILS.shorthands, process.argv, 2)) | |
| const secondArg = args.getIn(['argv', 'remain']).get(1) | |
| const remote = args.get('remote') || config.default_remote | |
| const remoteUrl = git.getRemoteUrl(remote) | |
| const options = args.merge({ |
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
| // unique port to this dev server | |
| const port = 3000 | |
| const webpackConfig = { | |
| entry: '...', | |
| output: '...', | |
| devServer: { | |
| host: '0.0.0.0', | |
| public: `localhost:${port}`, | |
| disableHostCheck: true, |
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
| // Adapted from: https://stackoverflow.com/a/65642944/6502003 | |
| type CamelToSnake<T extends string, P extends string = ''> = string extends T | |
| ? string | |
| : T extends `${infer K}${infer R}` | |
| ? CamelToSnake<R, `${P}${K extends Lowercase<K> ? '' : '_'}${Lowercase<K>}`> | |
| : P | |
| /** | |
| * Converts camelCase key in interface to snake_case key | |
| * Example: |
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 type ExpandRecursively<T> = T extends (...args: infer A) => infer R | |
| ? (...args: ExpandRecursively<A>) => ExpandRecursively<R> | |
| : T extends object | |
| ? T extends infer O | |
| ? { [K in keyof O]: ExpandRecursively<O[K]> } | |
| : never | |
| : Texport type ExpandRecursively<T> = T extends (...args: infer A) => infer R | |
| ? (...args: ExpandRecursively<A>) => ExpandRecursively<R> | |
| : T extends object | |
| ? T extends infer O |
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
| sudo apt update | |
| sudo apt install fish copyq -y | |
| echo "fish" >> ~/.bashrc | |
| source ~/.bashrc |
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
| /** | |
| * As written this will brute force passwords to handle the case where LDAP injection allows the wildcard character: | |
| * a* | |
| * ab* | |
| * abc* | |
| * | |
| * If the password works with the * we try that pass without the * to see if it works. | |
| * If it does, we cracked the password. | |
| * If not, we continue on adding another char thereby increasing the length of the password by 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
| const { SocketClientTCP } = require("netlinkwrapper"); | |
| let maze; | |
| let solved; | |
| let lastTravelMsg; | |
| const size = 30; | |
| const endRow = size - 1; | |
| const endCol = size - 1; | |
| const port = 1234; | |
| const client = new SocketClientTCP(port, "159.223.124.69"); |
