Skip to content

Instantly share code, notes, and snippets.

View matchatype's full-sized avatar

Andrea Di Marco matchatype

View GitHub Profile
@matchatype
matchatype / setup.sh
Created January 29, 2021 07:32 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@matchatype
matchatype / cloudinary.js
Created June 25, 2020 22:37 — forked from rikschennink/cloudinary.js
FilePond Cloudinary
const createCloudinary = (cloudName, unsignedUploadPreset) => ({
process: (fieldName, file, metadata, load, error, progress, abort) => {
// `fieldName` and `meta` are not used for now
const url = `https://api.cloudinary.com/v1_1/${cloudName}/upload`;
const xhr = new XMLHttpRequest();
const formData = new FormData();
@matchatype
matchatype / .eslintrc
Created May 2, 2020 23:23 — forked from 1natsu172/.eslintrc
My airbnb based ESLint config for "typescript-eslint" with React & prettier
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "."
},
"env": {
"browser": true,
"jest/globals": true
},
@matchatype
matchatype / .firebaserc
Created November 25, 2019 22:46 — forked from vlaja/.firebaserc
.firebaserc file example for multiple targets under one project
{
"projects": {
"default": "project-name"
},
"targets": {
"project-name": {
"hosting": {
"production": [
"project-name"
],

Keybase proof

I hereby claim:

  • I am matchatype on github.
  • I am andreadimarco (https://keybase.io/andreadimarco) on keybase.
  • I have a public key ASAm1ejmPcZSyolcP411yZhNjv7xK0ncbAjWpOtrzVc_fwo

To claim this, I am signing this object:

@matchatype
matchatype / reactsjs-scroll-in-nav.md
Created June 6, 2019 11:37 — forked from brthornbury/reactsjs-scroll-in-nav.md
Simple ReactJS component to support a navbar becoming visible after the user scrolls down the page.

Ensure you have raf installed: npm install --save raf

This is the code for the component.

import raf from 'raf';

export default class ScrollInNav extends Component {
  static propTypes = {
    scrollInHeight: React.PropTypes.number
@matchatype
matchatype / git-tag-delete-local-and-remote.sh
Created May 3, 2019 12:55 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@matchatype
matchatype / fetch.js
Created November 12, 2018 18:25 — forked from dgraham/fetch.js
Simple window.fetch wrapper.
(function() {
function status(response) {
if (response.ok) {
return response
} else {
var error = new Error(response.statusText || response.status)
error.response = response
throw error
}
}
@matchatype
matchatype / .eslintignore
Created August 10, 2018 07:38 — forked from remy/.eslintignore
My Next.js eslint config + `npm install --save-dev eslint eslint-config-airbnb eslint-plugin-react`
.next
out
@matchatype
matchatype / error-examples.js
Created July 29, 2018 06:19 — forked from filippo/error-examples.js
Error management in javascript
/*
* From the article "The Art of Error"
* http://dailyjs.com/2014/01/30/exception-error/
*/
/* node example */
var assert = require('assert');
var util = require('util');
function NotFound(message) {