Skip to content

Instantly share code, notes, and snippets.

View tkharuk's full-sized avatar
🐢

Taras Kharuk tkharuk

🐢
View GitHub Profile
let DataContext = React.createContext();
function DataTable({ children }) {
return <section className="data-table">{children}</section>;
}
function DataTableHead({ children }) {
return (
<header className="data-table-head">
<div className="data-table-row">{children}</div>
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active May 3, 2024 12:56
Online Resources For Web Developers (No Downloading)
@Kruemelkatze
Kruemelkatze / ! Theming Ant Design with Sass and Webpack.md
Last active April 5, 2023 13:25
Theming Ant Design with Sass and Webpack

Theming Ant Design with Sass and Webpack

This is a solution on how to theme/customize Ant Design (which is written in Less) with Sass and webpack. Ant itself offers two solutions and a related article on theming, but these are only applicable if you use Less, the antd-init boilerplate or dva-cli.

What this solution offers:

  • use a single sass-file to customize (no duplicate variables for your project and Ant)
  • hot reload compatibility
  • no dependencies on outdated npm modules
  • easy integration with your existing webpack setup (webpack 3+ tested)
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@dahjelle
dahjelle / pre-commit.sh
Created July 13, 2016 16:48
Pre-commit hook for eslint, linting *only* staged changes.
#!/bin/bash
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$')
do
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes
if [ $? -ne 0 ]; then
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint."
exit 1 # exit with failure status
fi
done
@jrencz
jrencz / .eslintrc
Created April 12, 2016 12:05
Useful set of words for eslint-plugin-spellcheck
{
"plugins": [
"spellcheck"
],
"rules":
// Spellcheck
//
"spellcheck/spell-checker": ["warn", {
"skipWords": [
// own names
@birkir
birkir / chuck-norris.js
Created November 14, 2014 10:54
Convert 7-bit ASCII to Chuck Norris style binary
/**
* Convert 7-bit ASCII to Chuck Norris style binary
*
* @param string Characters to encode
* @return string Binary' norris style.
*/
function asciiToChuckNorris(chars) {
// Variables
var bits = [],
@listochkin
listochkin / README.md
Last active August 29, 2015 14:08
Set up iojs environment for Node API class

Instructions

If you

  • run Mac OS X or Linux
  • have iojs installed ($ node -v prints v2.0.1)
  • can bulid binary Node packages (npm install ws doesn't fail)

then you can skip all the steps below.

@jeffmo
jeffmo / gist:054df782c05639da2adb
Last active January 11, 2024 06:05
ES Class Property Declarations
@jareware
jareware / SCSS.md
Last active April 23, 2024 22:13
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso