Skip to content

Instantly share code, notes, and snippets.

View madchester's full-sized avatar
💭
I may be slow to respond.

madchester

💭
I may be slow to respond.
View GitHub Profile
@madchester
madchester / MessengerChat.js
Created September 28, 2020 12:11
Facebook Messenger Chat Plugin with NextJS
import React, { Component } from 'react'
import PropTypes from 'prop-types'
/**
* Utils
*/
const removeElementByIds = ids => {
ids.forEach(id => {
const element = document.getElementById(id)
if (element && element.parentNode) {
@madchester
madchester / sampleActions.js
Last active April 11, 2020 12:48
sample redux
export function getList() {
return (dispatch) => {
return axios.get(
`sampleurl`
headers: {
'Authorization': localdb.getItem('token')
}
})
.then((reponseList) => {
dispatch({
@madchester
madchester / index.html
Created November 15, 2019 08:20 — forked from nicholaskajoh/index.html
Lazy load your content with Django and jQuery
<html>
<head>
<script type="text/javascript">
// A CSRF token is required when making post requests in Django
// To be used for making AJAX requests in script.js
window.CSRF_TOKEN = "{{ csrf_token }}";
</script>
</head>
<body>
<h2>My Blog Posts</h2>
@madchester
madchester / postgres-brew.md
Created October 28, 2019 02:10 — 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