Skip to content

Instantly share code, notes, and snippets.

View CheoR's full-sized avatar
💭
Keep learning.

CheoR

💭
Keep learning.
View GitHub Profile
@bradtraversy
bradtraversy / laravel_xampp_setup.md
Created April 22, 2022 01:16
Laravel Xampp setup on Mac and Windows

Laravel Xampp Setup (Windows & Mac)

Install Xampp

Install Xampp from https://www.apachefriends.org/index.html

  • Run the Xampp installer and open the Xampp control panel
  • Make sure that you enable the Apache and MySQL services
  • On mac you need to click "Start" on the Home tab, "Enable" on the Network tab and "Mount" on the Location Tab. Click "Explore" on the location tab to open your Xampp/Lampp folder

Install Composer

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active May 23, 2024 20:53
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@yovany-lg
yovany-lg / expo-typescript-eslint-prettier.md
Last active April 12, 2024 17:08
Setting up React Navite: Expo + Typescript + Eslint (Airbnb) + Prettier

Steps to get started with Expo, Typescript, ESLint and Prettier

The first step is to use the Expo CLI to initialize the project. If you don't have the latest version of the Expo CLI tool, (or you don't have it installed) run npm install -g expo-cli.

Now run the following commands in the same order:

  • expo init my-app -t expo-template-blank-typescript
  • npx install-peerdeps --dev eslint-config-airbnb
  • npm i --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin
  • npm i --save-dev prettier eslint-config-prettier eslint-plugin-prettier

Create or edit the file .eslintrc.json with the following content:

@swedishmike
swedishmike / gist:902fb27d627313c31a95e31c44e302ac
Created October 17, 2019 13:07
Adding and removing virtual environments to Jupyter notebook
## Create the virtual environment
conda create -n 'environment_name'
## Activate the virtual environment
conda activate 'environment_name'
## Make sure that ipykernel is installed
pip install --user ipykernel
## Add the new virtual environment to Jupyter
@raftheunis87
raftheunis87 / eslint-prettier-typescript
Last active January 26, 2023 16:55
ESLint with airbnb and Prettier for Typescript
1) install dependencies:
yarn add @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb-typescript eslint-config-prettier eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier --dev
2) create .eslintrc.js file:
```
module.exports = {
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
extends: [
@BeKnowDo
BeKnowDo / ubuntu-setup.md
Last active March 10, 2024 15:05
Setting up Ubuntu for my development environment and other utilities

Ubuntu 20.04

Installing gDebi

sudo apt install gdebi-core

Sharing Drives via Samba

  • Install the taskel and samba server packages
    • sudo tasksel install samba-server
    • sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
    • sudo bash -c 'grep -v -E "^#|^;" /etc/samba/smb.conf_backup | grep . > /etc/samba/smb.conf'
  • sudo nano /etc/samba/smb.conf
"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------
@vre2h
vre2h / normalize.md
Last active May 21, 2024 20:54
Simple guide to adding normalize.css to create-react-app
  1. Install normalize.css via npm
npm install --save normalize.css

1.1 Or yarn

yarn add normalize.css
@jay-johnson
jay-johnson / Django_ReactJS_Webpack_project_setup.md
Created July 12, 2017 22:21 — forked from Belgabor/Django_ReactJS_Webpack_project_setup.md
Set up a Django + ReactJS project with Webpack manager

Guide on how to create and set up your Django project with webpack, npm and ReactJS :)

Hopefully this will answer "How do I setup or start a Django project?" I was trying to set up my own website, and there was a lot to read, learn and digest! Therefore, I put this together which is a collection of all the guides/blog posts/articles that I found the most useful. At the end of this, you will have your barebones Django app configured and ready to start building :)

NOTE: This guide was built using Django 1.9.5, NodeJS 4+ with NPM 3+

1. Setting up your dev environment

@siakaramalegos
siakaramalegos / basic_router.jsx
Last active July 6, 2023 04:02
Basic example of React Router: BrowserRouter, Link, Route, and Switch
// BrowserRouter is the router implementation for HTML5 browsers (vs Native).
// Link is your replacement for anchor tags.
// Route is the conditionally shown component based on matching a path to a URL.
// Switch returns only the first matching route rather than all matching routes.
import {
BrowserRouter as Router,
Link,
Route,
Switch,
} from 'react-router-dom';