Skip to content

Instantly share code, notes, and snippets.

View faustaleonardo's full-sized avatar
👀
Hello there 👋

Fausta Leonardo faustaleonardo

👀
Hello there 👋
View GitHub Profile
// original source: https://medium.com/@ndyhrdy/making-the-bottom-sheet-modal-using-react-native-e226a30bed13 🙇
import React, {useEffect, useRef} from 'react';
import {
Animated,
Dimensions,
Modal,
PanResponder,
StyleSheet,
View,
} from 'react-native';
@nikhita
nikhita / update-golang.md
Last active April 26, 2024 04:46
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@paulsturgess
paulsturgess / service.js
Last active February 2, 2024 17:24
An example Service class wrapper for Axios
import axios from 'axios';
class Service {
constructor() {
let service = axios.create({
headers: {csrf: 'token'}
});
service.interceptors.response.use(this.handleSuccess, this.handleError);
this.service = service;
}
@tsrivishnu
tsrivishnu / gitignore_already_tracked_file.md
Last active February 23, 2024 08:09
Git: Ignore already checked in file

Git: How can I ignore a file that is already committed to the repo?

You have a repo and quite some developers have cloned the repo and working on it. Now you want to add a file to gitignore which is already checked-in or tracked by Git.(The file is already commited into the repo)

Below are the steps on how to ignore this file (lets say the filename is config.py):

  • Add it to .gitignore:

$ echo "config.py" >> .gitignore

@ruph
ruph / .vimrc
Last active April 25, 2024 16:02
vim settings
" Use vim settings, rather then vi settings (much better!)
" This must be first, because it changes other options as a side effect.
set nocompatible
set t_Co=256 " iTerm2 supports 256 color mode.
set ai " auto indenting
set history=100 " keep 100 lines of history
set ruler " show the cursor position
syntax on " syntax highlighting
filetype plugin on " use the file type plugins