Skip to content

Instantly share code, notes, and snippets.

View aalaap's full-sized avatar
🎯
Focusing

Aalaap Ghag aalaap

🎯
Focusing
View GitHub Profile
@cdsaenz
cdsaenz / index.html
Created August 19, 2022 14:11
Demo Alpine JS and Fetch from Remote API
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alpine Ajax test</title>
</head>
<body>
<h1>Users API Retrieval Test</h1>
@DavidWells
DavidWells / github-proxy-client.js
Last active March 15, 2024 08:28
Full Github REST api in 34 lines of code
/* Ultra lightweight Github REST Client */
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const token = 'github-token-here'
const githubClient = generateAPI('https://api.github.com', {
headers: {
'User-Agent': 'xyz',
'Authorization': `bearer ${token}`
}
})
@jherax
jherax / git-ssh-auth-win-setup.md
Last active February 12, 2024 19:37 — forked from bsara/git-ssh-auth-win-setup.md
Setup SSH Authentication for Git Bash on Windows

Setup SSH Authentication for Git Bash on Windows

Prepararation

  1. Create a folder at the root of your user home folder (Example: C:/Users/username/) called .ssh.
    You can run something like: mkdir -p ~/.ssh
  2. Create the following files if they do not already exist (paths begin from the root of your user home folder):
@gaearon
gaearon / modern_js.md
Last active April 18, 2024 15:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@kerryrodden
kerryrodden / README.md
Last active January 18, 2021 11:05
Zoomable sunburst with updating data

I combined Mike Bostock's Zoomable Sunburst and Sunburst Partition examples, so that I could have both zooming and updating the underlying data (between count and size, in this case). A simple combination of the examples does not work; you have to edit the arcTween function used for updating the data, so that when it redraws the partition layout, it takes account of the current zoom level by adjusting the domain of the x scale.

Click on any arc to zoom in, and click on the center circle to zoom out. Use the Size/Count radio buttons to update the data.