Skip to content

Instantly share code, notes, and snippets.

View Harduim's full-sized avatar

Arthur Harduim Harduim

View GitHub Profile
@jbutko
jbutko / handle-file-download-react-axios.js
Last active January 31, 2024 04:48
React, JS, Axios: Download blob file (PDF...)
import axios, { AxiosResponse } from 'axios';
import { get } from 'lodash-es';
const rest = axios.create({
baseURL: 'some base URL goes here',
});
// this one send file as Blob type
const getPdf = () => (
rest.get(`/get-pdf`, {
@danott
danott / pre-commit
Last active April 26, 2024 06:46
A git hook that automatically formats JavaScript and Ruby code on commit
#!/bin/sh
# ./.git/hooks/pre-commit
.git/hooks/pre-commit-format-javascript
.git/hooks/pre-commit-format-ruby
@ywwwtseng
ywwwtseng / host-react-app-on-apache-server.md
Last active March 8, 2024 12:16
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production

@Warchant
Warchant / sonarqube-docker-compose.yml
Last active March 15, 2024 13:04
docker-compose file to setup production-ready sonarqube
version: "3"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks:
@DanDiplo
DanDiplo / JS-LINQ.js
Last active April 29, 2024 10:30
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },