Skip to content

Instantly share code, notes, and snippets.

View jdnichollsc's full-sized avatar
🏠
Working from home

J.D Nicholls jdnichollsc

🏠
Working from home
View GitHub Profile
@Angelfire
Angelfire / splitList.js
Created August 25, 2022 02:11
Split a list into X chunks
function splitList(list, chunkSize) {
const groupSize = Math.ceil(list.length / chunkSize)
let chunked = []
for (let i = 0; i < list.length; i += groupSize) {
chunked.push(list.slice(i, i + groupSize))
}
return chunked
}
@adilanchian
adilanchian / App.js
Last active March 15, 2023 09:32
Section 3: Build web3 app that connects to our wallet and talks to our WaveContract
import React, { useEffect, useState } from "react";
import { ethers } from "ethers";
import './App.css';
import abi from './utils/WavePortal.json';
const App = () => {
const [currentAccount, setCurrentAccount] = useState("");
/**
* Create a varaible here that holds the contract address after you deploy!
*/
/*
* Write a function:
*
* function solution(A);
*
* that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.
*
* For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5.
*
* Given A = [1, 2, 3], the function should return 4.
@selalipop
selalipop / GameState.cs
Last active September 9, 2022 20:29
Using Server-Sent-Events in Unity
using Newtonsoft.Json;
///Use of Newtonsoft.Json is fully optional
namespace Backend
{
[JsonObject]
public struct GameState
{
[JsonProperty("maxPlayers")] public int MaxPlayers;
[JsonProperty("imposterCount")] public int ImposterCount;
@plencovich
plencovich / mercadopago-marketplace.md
Last active January 7, 2024 14:34
Breve explicación para poder crear una app en Mercadopago para tener un marketplace

Plenco

Mercadopago Marketplace

Mini tutorial para crear una app de marketplace en mercadopago usando PHP y DX-PHP

Es una ayuda memora en referencia a la excelente información que está en Mercadopago Developers

Creación de APP y Conexión de Usuarios.

@vmoratog
vmoratog / rotateImage.ts
Created November 29, 2019 03:54
Rotate images in Canvas
const imageData = canvas.toDataURL()
const degrees = 90
const image = new Image();
image.onload = () => {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save();
ctx.translate(canvas.width / 2, canvas.height / 2);
ctx.rotate(degrees * Math.PI / 180);
ctx.drawImage(image, -image.width / 2, -image.width / 2);
@vmoratog
vmoratog / Enlaces.md
Last active February 10, 2020 04:51
ionic 4 intro

Instalar dependencias

npm i -g ionic cordova

Crear proyecto

ionic start nombreProyecto blank

Prepare and run an end-of-module assessment for HTML&CSS

What's needed this week?

I suggest two possible formats for the assessment: either Nate's single-file quiz, here: https://gist.github.com/NateWr/3d8b0cc5eb19712912d9f31dfb1d7896 or my interactive version on Kahoot, here: https://create.kahoot.it/share/html-css-quick-quiz/98be1fc1-00d6-4186-98b9-fbac58b8fce3

  • Pick one format.
  • Check that the content is suitable.
  • Translate it.
  • Add any more questions that you think are important, but keep the exercise under 1 hour.
@jdnichollsc
jdnichollsc / ABC.md
Last active April 16, 2024 03:40
The Job Interview Guide

The Job Interview Guide 💼

And English is a Work in Progress ⌛

@lisp-is-the-future
lisp-is-the-future / install-termux-arch.md
Last active May 20, 2022 10:30
How to install TermuxArch in Termux of Android (Samsung Galaxy Tab 10.1)
#################################################################
# How to install Arch in your Android (into the App TermuxArch)
# and be able to use your Android device like a personal computer
# even running a X server to have GUI
#################################################################


###############################
# Install Termux