Skip to content

Instantly share code, notes, and snippets.

View saneef's full-sized avatar
🐢

Saneef Ansari saneef

🐢
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

aspe:keyoxide.org:QE7TCRY5MSDM6WOXCR4I5EEWPU

# Troubleshooting: LSP-typescript
## Version
- LSP: 1.22.0
- Sublime Text: 4143
## Server Test Run
- exit code: 0
- output
```
```
@saneef
saneef / fix-p-tag-max-width.js
Last active April 5, 2022 08:41
Set max-width style of <p> and <li> tags to 60ch. Making long texts easier to read
const styles = `p,li {max-width: 60ch !important;}`;
const style = document.createElement("style");
document.head.appendChild(style);
style.appendChild(document.createTextNode(styles));
@saneef
saneef / SketchSystems.spec
Created November 5, 2020 05:13
My Awesome Sketch
My Awesome Sketch
First State
some event -> Second State
Second State
@saneef
saneef / SketchSystems.spec
Last active November 5, 2020 05:16
Order
Order
Pending*
order_executed -> Executed
order_partially_executed -> Partially Executed
order_expired -> Expired
order_cancelled_by_backend -> Cancelled
Partially Executed
order_partially_executed -> Partially Executed
order_executed -> Executed
Executed
@saneef
saneef / machine.js
Last active October 24, 2020 23:58
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@saneef
saneef / machine.js
Last active October 23, 2020 17:20
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@saneef
saneef / machine.js
Last active October 21, 2020 07:24
Generated by XState Viz: https://xstate.js.org/viz
const MIN_LENGTH = 3;
const autocompleteInputMachine = Machine(
{
id: "autocomplete-input",
initial: "idle",
context: {
query: "",
message: "",
@saneef
saneef / machine.js
Last active October 10, 2020 09:17
Generated by XState Viz: https://xstate.js.org/viz
const ROLL_DELAY = 500; //ms;
const faceIndices = [0,1,2,3];
function getRandomInt (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
const pickFromArray = (items) => items[Math.floor(Math.random() * items.length)];