Skip to content

Instantly share code, notes, and snippets.

@BillClinton
BillClinton / gist:1a02103064eaa41712271ffe8a812c6e
Created February 1, 2018 15:15
Sencha bug: modified values in cell editor revert when clicking on a group header
When clicking on a group header after editing a cell, the value of cell reverts back to the previous value.
Expected behavior: the cell should retain it's newly modified value, just as it does if you click elsewhere on the grid, like when you click on another cell or the grid header.
This issue exists in versions 6.2.1 and 6.5.2, but does not seem to exist in previous versions, eg: 6.0.2. I tested using the classic toolkit with the Neptune theme.
Here is a fiddle that demonstrates this behavior: https://fiddle.sencha.com/#fiddle/2cie&view/editor To reproduce, edit the value in one of the cells in the "quote name" column, then click a group header. The value you have just edited will revert back to the previous value.
@BillClinton
BillClinton / regexCheatsheet.js
Created January 12, 2019 16:58 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@BillClinton
BillClinton / Symfony-notes.md
Last active August 1, 2019 18:35
Symfony notes

run project: php -S 127.0.0.1:8000 -t public

better server, install: composer require server

then: ./bin/console server:run


@BillClinton
BillClinton / icon-fonts-vs-svg.md
Last active November 4, 2019 03:03
Icon Fonts vs SVGs

Issues with icon fonts

  • usually requires an additional request
  • can be missing from page while loading
  • if fonts don't load or browser can't interpret fonts pu may get strange characters

Advantages of SVG icons

  • superior scaling
  • render more quickly and reliably
  • don't need to be imported from external files
  • smaller in size than image formats and most icon libraries

Install bootstrap

npm install react-bootstrap bootstrap

Install Sass

npm install node-sass gatsby-plugin-sass

Set up Bootstrap scss

  • Download source files from getbootstrap.com and copy the scss directory to src/scss/bootstrap
  • Configure gatsby-plugin-sass, specifying the bootstrap scss directory created in porevious step:
@BillClinton
BillClinton / node-jest-testing.md
Last active October 3, 2019 21:50
set up jest

Testing node using Jest

Install

  • Install jest as a dev dependency

nmp i jest --save-dev

Set up directories

@BillClinton
BillClinton / elastic-beanstalk-node.md
Last active October 13, 2019 02:14
elastic-beanstalk-node

502 Bad Gateway errors

nginx is connecting to node on 8081, so make sure port defaults to 8081

app.set('port', process.env.PORT || 8081);

Make sure run command is specified

  • From the EB App Dashboard, go to Eb Configuration -> Software Configuration.
  • Under Container Options -> Node Command add "npm start", or "node ".

Notes

Misc

If you animate scale, it's going to animate the content of the div too.

Performance

If you animate height or width it's a huge performance bottleneck

Resources:

@BillClinton
BillClinton / export-svg-inkscape.md
Created November 2, 2019 00:59 — forked from brenopolanski/export-svg-inkscape.md
Exporting an object as svg from inkscape
  1. Select the object(s) to export
  2. Open the document properties window (Ctrl+Shift+D)
  3. Select "Resize page to drawing or selection"
  4. File > Save As Copy...
  5. Select Optimized SVG as the format if you want to use it on the web
@BillClinton
BillClinton / espruino.md
Last active November 26, 2019 08:47
espruino

sudo screen /dev/ttyS4

to quit: ctrl-a then type :quit