Skip to content

Instantly share code, notes, and snippets.

View CarlMungazi's full-sized avatar
🕵️‍♂️
Digging into source code...

Carl Mungazi CarlMungazi

🕵️‍♂️
Digging into source code...
View GitHub Profile
@afeld
afeld / gist:4952991
Last active February 8, 2022 03:13
good APIs for mashups

This list has been superseded by Public APIs. Check there for APIs with Auth: No, HTTPS and CORS Yes.


List of data APIs that require no server-side auth or private credentials, and are thus good for small browser-only JS projects.

@leecrossley
leecrossley / index.html
Created July 18, 2013 08:48
A CodePen by Lee Crossley. Avatar Generator from Name - A name (first name and surname) is input and a canvas element is output using the initials from the name and a background colour (based on the first name first letter). The background colours are from from http://flatuicolors.com/ Now with retina support.
<canvas id="user-icon" width="256" height="256"></canvas>
@gilbert
gilbert / index.html
Created January 16, 2015 16:22
Quizzy Part 1 MVC w/ Mithril.js
<html>
<head>Quizzy Part 1 MVC</head>
<body>
<div id="app"></div>
<script src="vendor/mithril.js" type="text/javascript"></script>
<script src="quiz.js" type="text/javascript"></script>
<script type="text/javascript">
Quiz.vm.questions([
@taniarascia
taniarascia / index.html
Last active May 28, 2024 00:15
HTML Skeleton file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
@debashisbarman
debashisbarman / README.md
Last active February 15, 2024 02:19
A boilerplate Twitter bot that can retweet in response to the tweets matching particluar keyword (https://goo.gl/4whEIt)

Creating a Twitter bot with Node.js

Learn how you can create your own Twitter bot using Node.js and the new Twitter API. The bot will auto retweet in response to tweets with some particular hashtags. (https://goo.gl/4whEIt)

Tools we need

Here are the tools we’ll be using to create the bot — 

  • Node.js installed in your machine
  • A registered Twitter account

Create a Twitter application

@gaearon
gaearon / connect.js
Last active April 11, 2024 06:46
connect.js explained
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (
@jesstelford
jesstelford / event-loop.md
Last active June 7, 2024 17:12
What is the JS Event Loop and Call Stack?

Regular Event Loop

This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)


Given the code

@gilbert
gilbert / data-deps.js
Last active February 7, 2018 23:39
React GET Data Dependencies helper
//
// Our main data fetching tool.
// This fetches an object of promise makers ONLY ON THE CLIENT SIDE,
// and manages loading and data states for each key.
//
import React from 'react'
import http from './http'
export default (promisesMakers, options={}) => Component =>
class FetchHOC extends React.Component {
@michaeltreat
michaeltreat / mongodb_shell_commands.md
Last active May 22, 2024 10:37
Quick Cheat Sheet for Mongo DB Shell commands.

MongoDB Shell Commands Cheat Sheet.

This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.

Preface:

Mongo Manual can help you with getting started using the Shell.

FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.

@sebmarkbage
sebmarkbage / The Rules.md
Last active June 6, 2024 16:25
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.