Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<ol>
<li>I love squash</li>
@mfrancois3k
mfrancois3k / pokemon.json
Created January 28, 2022 03:32 — forked from jherr/pokemon.json
Pokemon list
[{
"id": 1,
"name": {
"english": "Bulbasaur",
"japanese": "フシギダネ",
"chinese": "妙蛙种子",
"french": "Bulbizarre"
},
"type": [
"Grass",
@mfrancois3k
mfrancois3k / API-functions.js
Created February 20, 2022 01:49 — forked from louiskueh/API-functions.js
BlackBaud API exploration
var helper = {
processCodings: function (codingArray) {
// ID = 6, description: Fund
var fund;
// ID = 4, description : "Program Area "
var programArea;
for (var i = 0; i < codingArray.length; i++) {
var obj = codingArray[i]
import React, {useState, useRef, useEffect, useContext} from 'react';
import {
ScrollView,
StyleSheet,
Text,
View,
Animated,
TouchableWithoutFeedback,
Linking,
Modal,
@mfrancois3k
mfrancois3k / 000-promises.js
Created February 20, 2022 02:11 — forked from hugohabel/000-promises.js
Basics of a Promise
const https = require('https');
// Constants
const URL = 'https://fakestoreapi.com/products';
const requestParams = {
url: URL
};
/**
@mfrancois3k
mfrancois3k / kata44.js
Created February 20, 2022 02:12 — forked from goodgoshjosh/kata44.js
Kata 44 - Map Basics
// 44: Map - basics
// To do: make all tests pass, leave the assert lines unchanged!
// Follow the hints of the failure messages!
describe('`Map` is a key/value map', function(){
it('`Map` is a new global constructor function', function() {
const typeOfMap = 'function';
assert.equal(typeof Map, typeOfMap);
});
it('provides `new Map().set()` to add key+value pair, `get()` to read it by key', function() {
@mfrancois3k
mfrancois3k / .bashrc || .zshrc
Created February 20, 2022 02:13 — forked from mischah/.bashrc || .zshrc
Aliases to trash node_modules and lockfiles via Yarn and npm
alias npm-reset="rm -rf node_modules && rm -f package-lock.json && npm install && npx node-notifier-cli -t 'Done' -m 'npm modules reinstalled' -s Glass -i https://cdn.rawgit.com/npm/logos/31945b5c/npm%20square/n-64.png"
alias yarn-reset="rm -rf node_modules && rm -f yarn.lock && yarn && npx node-notifier-cli -t 'Done' -m 'npm modules reinstalled' -s Glass -i https://cdn.rawgit.com/yarnpkg/assets/ab1fa0d4/yarn-kitten-circle.png"
@mfrancois3k
mfrancois3k / gist:bbf0eedbcf5e29f0a98d7f3266c83cc1
Created February 20, 2022 02:35 — forked from mischah/gist:1289555
Recursively delete .svn directories
cd FOLDER
rm -rf 'find . -type d -name .svn'
@mfrancois3k
mfrancois3k / async-javascript-basics.js
Created February 20, 2022 02:38 — forked from decentraliser/async-javascript-basics.js
Async JavaScript basics: Promises and async/await
// @ts-nocheck
/* eslint-disable */
// Asynchronous JavaScript basics
// Contrary of Synchronous
// Synchronous code runs line by line, instantly: eg
function logSum(a, b) {
console.log(a + b)
@mfrancois3k
mfrancois3k / redux-ajax.js
Created February 20, 2022 02:40 — forked from aamnah/redux-ajax.js
[work-in-progress] Redux + AJAX basics
// Basic AJAX Example
import React, { Component } from 'react'
import { render } from 'react-dom'
import { createStore, applyMiddleware, combineReducers } from 'redux'
import { Provider, connect } from 'react-redux'
import axios from 'axios'
import createLogger from 'redux-logger'
import thunkMiddleware from 'redux-thunk'
const logger = createLogger()