Skip to content

Instantly share code, notes, and snippets.

View ninhxuanluu's full-sized avatar
🏠
Working from home

Luu Ninh ninhxuanluu

🏠
Working from home
View GitHub Profile
@eyecatchup
eyecatchup / hsvToRgb.js
Last active March 7, 2021 23:32
HSV to RGB color conversion - JavaScript-Port from the excellent java algorithm by Eugene Vishnevsky at http://www.cs.rit.edu/~ncs/color/t_convert.html
/**
* HSV to RGB color conversion
*
* H runs from 0 to 360 degrees
* S and V run from 0 to 100
*
* Ported from the excellent java algorithm by Eugene Vishnevsky at:
* http://www.cs.rit.edu/~ncs/color/t_convert.html
*/
function hsvToRgb(h, s, v) {
@staltz
staltz / introrx.md
Last active June 2, 2024 11:03
The introduction to Reactive Programming you've been missing
@juliengdt
juliengdt / CHANGELOG.md
Last active September 5, 2023 09:27
CHANGELOG.md template

CHANGELOG.md

1.8.0 (unreleased)

Features:

  • add support for SVN sources -> 95f32s5b
  • add metadata allowed_push_host to new gem template -> 95f32s5b
  • adds a --no-install flag to bundle package -> 95f32s5b
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@twolfson
twolfson / README.md
Last active August 1, 2023 10:45
Node.js job queue evaluation

We are building a Node.js service which will need asynchronous support for tasks like sending emails. Here's our evaluation:

@jacurtis
jacurtis / _spacing-helpers.scss
Last active May 30, 2024 17:41
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 15, 2024 09:41
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render