A penis, made purely with css
A Pen by Michael Katz on CodePen.
| #!/usr/bin/env bash | |
| # Inspired by https://github.com/ThePrimeagen/.dotfiles/blob/602019e902634188ab06ea31251c01c1a43d1621/bin/.local/scripts/tmux-sessionizer | |
| # Just for zellij | |
| # alows you to use `fzf` to navigate into a desire folder and either start or attach into a zellij session | |
| # If you run it from inside zellij, it will open the newly selected folder in a new pane | |
| # Demo of the original: https://youtu.be/bdumjiHabhQ?t=269 | |
| # 1. Place the script in your path |
| // Following an answer I posted to my question here: | |
| // http://stackoverflow.com/questions/21856892/node-crypto-aes256-cbc-0x0-padding-example/21858749#21858749 | |
| //I'm expecting a utf8 encoded string | |
| function customPadding(str, blockSize, padder, format) { | |
| str = new Buffer(str,"utf8").toString(format); | |
| //1 char = 8bytes | |
| var bitLength = str.length*8; |
| /* | |
| * Conditional types can become tedious to maintian as nested ternary syntax is hard to understand | |
| * The following suggests a different approach, using a mapped key: value pair where adding additional rules and - | |
| * restrictions becomes much easier to read and maintain. | |
| * [TSPlayground](https://www.typescriptlang.org/play?ssl=38&ssc=20&pln=38&pc=24#code/KYOwrgtgBAgiCWECGAbKBvAsAKCnqAIgPIDiUAvFAEQAmA9gOZUA0O+UAwjACoXUDGSAC4s2+AGIBJAMoAJPlQBm8AM4ALKjgC+OXdngghwAE6Kk-YIUYAFY3QAOKjGLwAjJMYDWALiiu6dCjASCAA3Np6Bkam5pbiqmq2Dk5YuPgqAO6IvkLGYMAR2DhRJmYWsAjIKACySPbOaXgA2nCIqAB0xCQAur4ENnaOrI1QLZUdUnK9UPHqSY6FekIAnvZxAXwAPLzAAB5GIDROnsDLdIoVbTV1AHwAFCFXvtzMUDTCSL6tVbX2TdzdACUFBuUAAbnR4DRwkVsCs1lAAEriDaUbZQPYHI5QE5nC7fVC-e7vISfS4-Or-IEg8GQ6F6fh0EAqIRQRQBXwouh8B7jFCvRTBIRgYzAYHkUHoKA6bCM5ms4xc3zI1FQO6C4QisU09AynAAen1UAAosY7MYnFkhGoDUaYMYGJBQKzzlB4ZYAORSzLZPwBIIhULSj1QVRQEB0VlIFQqeAMEBIVxBN3c+weJAQYDRKCu91QD39BjzFQe9q2qBEVwAK2A-FZKHg0VQUGQyxzIBQbZUa348EUbc8EYyICg9kGJiE8GAKleIRo+Z9EBD9Gn4cjGN2qlZBjdq09heLpZw7LodwJKE6pFe3 |
| /* | |
| This removes consecutive sequences from an array of characters. | |
| See examples below + a working example @ https://jsfiddle.net/63v4pbq7/5/ | |
| */ | |
| dedupeSequence = (seq) => { | |
| let sequences = []; | |
| // The longest sequence can be exacly half of the values | |
| const maxLength = Math.floor(seq.length / 2); | |
| const stringSequence = seq.join(""); |
| "languageserver": { | |
| "daml": { | |
| "command": "daml", | |
| "args": ["damlc", "ide", "--RTS", "+RTS", "-M6G", "-N"], | |
| "filetypes": ["daml"] | |
| }, | |
| } |
| import * as React from "react"; | |
| import { PropertyControls, ControlType, Override } from "framer"; | |
| import { data } from "./Examples"; | |
| const style: React.CSSProperties = { | |
| height: "100%", | |
| display: "flex", | |
| alignItems: "center", | |
| justifyContent: "center", | |
| textAlign: "center", | |
| color: "#8855FF", |
A penis, made purely with css
A Pen by Michael Katz on CodePen.
| # Relies on ripgrep: https://github.com/BurntSushi/ripgrep | |
| # | |
| # Params: | |
| # <library-name> a string with or without quotes | |
| # | |
| # Usage: | |
| # $ ./extracAllNamedImports <library-name> | |
| # Output | |
| # $ ./getNamedImportsByLibrary.sh date-fns |
| // Threading macros, also known as arrow macros, | |
| // convert nested function calls into a linear flow of function calls, | |
| // improving readability. The idea is similar to 'pipelining' | |
| const double = str => `${str} ${str}`; | |
| const reverse = str => str.split("").reverse().join(''); | |
| const capitalize = str => str.charAt(0).toUpperCase() + str.slice(1); | |
| const pad = (maxLength, chr = ' ') => str => str.toString().padEnd(maxLength, chr); | |
| const thread = function thread(...args) { |
| import * as React from "react"; | |
| import { PropertyControls, ControlType } from "framer"; | |
| import { data } from "./Examples"; | |
| export class ClickTrigger extends React.Component<any> { | |
| static propertyControls: PropertyControls = { | |
| number: { type: ControlType.Number, defaultValue: 0 } | |
| }; | |
| onClick = () => { |