Skip to content

Instantly share code, notes, and snippets.

View mjr's full-sized avatar
Indigo

Manaia Junior mjr

Indigo
View GitHub Profile
@mjr
mjr / get-image-urls.js
Created March 13, 2022 23:42 — forked from tobek/get-image-urls.js
Save images from chrome inspector/dev tools network tab
/* open up chrome dev tools (Menu > More tools > Developer tools)
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading)
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR
* open up JS console and enter: var har = [paste]
* (pasting could take a while if there's a lot of requests)
* paste the following JS code into the console
* copy the output, paste into a text file
* open up a terminal in same directory as text file, then: wget -i [that file]
*/
@mjr
mjr / cheatsheet.py
Created April 5, 2021 15:57 — forked from jacklinke/cheatsheet.py
Django models cheatsheet
import uuid
from django.db import models
# Use the import below instead, if using GeoDjango fields
# from django.contrib.gis.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.postgres.fields import (
ArrayField,
CICharField,
CIEmailField,
@mjr
mjr / postgres-brew.md
Created August 29, 2020 01:38 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
let UserContext = React.createContext();
class App extends React.Component {
state = {
user: null,
setUser: user => {
this.setState({ user });
}
};
@mjr
mjr / AppContext.js
Created October 7, 2019 03:01
React Snippets #react
import React, { useState } from 'react';
const initialState = {
app: {
hasLoaded: false
}
};
const AppContext = React.createContext(initialState);
@mjr
mjr / gitflow-breakdown.md
Created March 12, 2019 20:26 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository