Skip to content

Instantly share code, notes, and snippets.

@Gavinok
Gavinok / chatgpt.el
Last active June 4, 2023 22:22
chatgpt client for emacs WIP (Now Async!)
;;; chatgpt.el --- Simple ChatGPT frontend for Emacs -*- lexical-binding: t -*-
;; Copyright (C) Gavin Jaeger-Freeborn
;; This package is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This package is distributed in the hope that it will be useful,
@mfrancois3k
mfrancois3k / Video Downloader download_egghead_videos.sh
Created August 4, 2022 06:27 — forked from mnsami/download_egghead_videos.sh
this script is to download egghead videos using youtube-dl
#!/bin/bash
usage() { echo "usage: --coursename [--coursename \"build-a-react-app-with-redux\"] --type [--type \"courses|lessons\"]" 1>&2; exit 1; }
OPTS=$(getopt -o c:t: --long coursename:,type: -n 'download_egghead_videos.sh' -- "$@")
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
eval set -- "$OPTS"
@Olanetsoft
Olanetsoft / Getting-started-with-dapps.md
Last active January 1, 2024 17:56
Series 1: Mara Blockchain Masterclass - Nigeria

Series 1: Mara Blockchain Masterclass - Nigeria

This workshop is targeted at developers who are transitioning from Web2 to Web3 or have just recently gotten into Web3 and are looking to have a well-rounded foundation.

This first workshop is Series 1 in the three-part series that aims to introduce you to the blockchain and how to build on the blockchain.

Steps to set up a project, build and deploy a smart contract.

Step 1

1. Compound Components

Compound Components pattern is grouping related components together in a way so that it becomes easier to read and more extensible.

Use case:

  • When we want to leave state management to a parent/container/enclosing component and leave the markup to the the user of the components

How?

@ljaxferrand
ljaxferrand / _app.js
Created July 19, 2022 19:43
Framer Motion: Respect user motion prefs
import { motion, AnimatePresence } from "framer-motion";
import { fadeDown } from "../utils/animations";
import { MotionConfig } from "framer-motion";
import Layout from "../components/Layout";
import "../styles/globals.css";
function MyApp({ Component, pageProps, router }) {
return (
<MotionConfig reducedMotion="user">
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
@mfrancois3k
mfrancois3k / Docker Setup Sample Docker Web Application.md
Last active July 15, 2022 01:00 — forked from koistya/Sample Docker Web Application.md
Sample Docker-based web application setup

Docker-based Web Application Setup (example)

This is an example of hosting standalone web front-end (web) and data API (api) applications under the same domain via Nginx (acting as a reverse proxy) and Docker, where HTTP requests starting with example.com/graphql and example.com/login/* are being redirected to http://api:3000 and everything else under the same domain is going to be passed to http://web:3000.

Folder Structure

.
├── /nginx.sites/               # Server configuration for each of web apps
├── /nginx.snippets/            # Nginx code snippets
@mfrancois3k
mfrancois3k / Node Deploy node_nginx_ssl.md
Created July 14, 2022 19:28 — forked from Oliver-ke/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to Digital Ocean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@mfrancois3k
mfrancois3k / Notes FM-fullstack.md
Last active August 1, 2022 04:44 — forked from Oliver-ke/FM-fullstack.md
Note on Full Stack development at Frontend Masters

Note on Full Stack development at Frontendmasters.com

note: exclude the leading $ for commands, that just shows it a bash script and is meant to be run in a terminal

Full Stack => Knowing everything up from the front to the back

Frontend can be

  • Cars, -television, -browser, -etc

backend can be

  • API's, -platform, -Database -Security,