Skip to content

Instantly share code, notes, and snippets.

View Chudesnov's full-sized avatar

Alexander Chudesnov Chudesnov

View GitHub Profile
@jpawlowski
jpawlowski / brew-sync.sh
Last active September 26, 2023 19:54
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
@NolanDC
NolanDC / gsb.sh
Last active June 7, 2017 09:35
Git select-branch
list=$(git branch --list | grep -v \*)
declare -a branches=($list)
echo "Branches: "
for i in "${!branches[@]}"; do
printf "%s\t%s\n" "[$i]" "${branches[$i]}";
done
printf "Enter the number of the branch you'd like to switch to: "
@mistakster
mistakster / webpack.config.js
Created July 9, 2015 16:23
Webpack configuration file
/**
* Build for production:
* $ NODE_ENV=production webpack
*
* Build for staging or development mode
* $ webpack
*
* Run app server in dev mode and use Hot Module Replacement
* $ NODE_ENV=webpack nodemon --watch ./app index.js
*
@dfrencham
dfrencham / nifty-list-item-view.html
Created July 17, 2015 03:52
Knockout 3.3 Nested Components
<div style="border:1px solid blue; margin: 5px; padding: 5px;">
<label data-bind="text: labelText"></label>
<input type="text" />
</div>
@davidhund
davidhund / visually-hidden.css
Last active September 27, 2017 19:54
Hide visually, show for AT
/**
* = Visually Hide text
*
* Text remains accessible to AT such as Screen Readers
* Updated version:
* Taken from http://hugogiraudel.com/2016/10/13/css-hide-and-seek/
*
* ------------------------------------------------------------------------- */
.visually-hidden {
border: 0 !important;
@marcysutton
marcysutton / chrome-a11y-experiment-instructions.md
Last active January 31, 2023 22:07
Enable Chrome Accessibility Experiment

NOTE: This is no longer an experiment! You can use the accessibility inspector in Chrome Devtools now, including a fantastic color contrast inspection tool. Read more: https://developers.google.com/web/updates/2018/01/devtools#a11y


Just like any good element inspector helps you debug styles, accessibility inspection in the browser can help you debug HTML and ARIA exposed for assistive technologies such as screen readers. There's a similar tool in Safari (and reportedly one in Edge) but I like the Chrome one best.

As an internal Chrome experiment, this tool differs from the Accessibility Developer Tools extension in that it has privileged Accessibility API access and reports more information as a result. You can still use the audit feature in the Chrome Accessibility Developer Tools, or you could use the aXe Chrome extension. :)

To enable the accessibility inspector in Chrome stable:

@A-gambit
A-gambit / REACTIVE2016-LIGHTNING-PROPOSAL.md
Last active February 22, 2024 18:24
Proposal for lightning talk at ReactiveConf 2016: Road from UndefinedLand

Proposal for a lightning talk at the Reactive 2016.

Keep calm and like/retweet it on Twitter and star this Gist to vote on this talk.

Road from UndefinedLand

Undefiend

I work at Grammarly. We like React and happily use it in our applications. However, sometimes something goes wrong and bugs creep into the code. Here comes testing. It helps make us confident about the quality of our code.

@samthor
samthor / safari-nomodule.js
Last active February 14, 2024 02:54
Safari 10.1 `nomodule` support
// UPDATE: In 2023, you should probably stop using this! The narrow version of Safari that
// does not support `nomodule` is probably not being used anywhere. The code below is left
// for posterity.
/**
* Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will
* load <script nomodule> anyway. This snippet solve this problem, but only for script
* tags that load external code, e.g.: <script nomodule src="nomodule.js"></script>
*
* Again: this will **not** prevent inline script, e.g.:
@JamieMason
JamieMason / migrate-to-lerna.sh
Last active April 25, 2019 18:58
Bash script to migrate multiple projects into one Lerna monorepo (https://lernajs.io)
#!/usr/bin/env bash
set -x
shopt -s extglob dotglob
cd "$HOME"
rm -rf "$HOME/TEMP_DIR"
mkdir "$HOME/TEMP_DIR"
cd "$HOME/TEMP_DIR"
git init
@obenjiro
obenjiro / validation.md
Last active May 8, 2018 06:19
Валидация: Эра Парсеров