Skip to content

Instantly share code, notes, and snippets.

View 1502shivam-singh's full-sized avatar
🍀
Always learning

Shivam Singh 1502shivam-singh

🍀
Always learning
  • Indian Institute of Information Technology, Una
  • India
  • 05:22 (UTC -12:00)
  • X @Shivam15_
View GitHub Profile
@1502shivam-singh
1502shivam-singh / 24-11-2021-Apache-APISIX-Committer-experience.md
Last active November 25, 2021 19:40
My experience at Apache APISIX, from a contributor to a committer
@1502shivam-singh
1502shivam-singh / GSoC'21-Work-product.md
Last active May 3, 2023 19:43
Case study and Work product - Redesigning Apache APISIX's website

Case study and Work product - Redesigning Apache APISIX's website

The Apache Software Foundation

Hi, I am Shivam Singh, a Computer Science student from Indian Institute of Information Technology, Una (India) pursuing Bachelor of Technology in Computer Science and Engineering.

UPDATE : As some changes have been made in the original website, to look at my specific redesign go to the below mentioned URL
Updated - https://apisix-re.netlify.app/

UPDATE : As of October 5, 2021, my redesign has finally been deployed and is now live 🎉
Before my redesign - https://web.archive.org/web/20210810140337/https://apisix.apache.org/

@1502shivam-singh
1502shivam-singh / extendShaderMaterial.js
Created June 2, 2021 20:23
To extend shaderMaterial with three.js based lights, passing the light as uniform to the shader.
// To extend shaderMaterial with three.js based lights, passing
let light = new THREE.DirectionalLight(0xff0000);
light.position.set(0, 0, 1);
scene.add(light);
uniforms = THREE.UniformsUtils.merge( [
THREE.UniformsLib[ "lights" ],
{
u_time: {
type: "f",
@1502shivam-singh
1502shivam-singh / deadlock.cpp
Created May 8, 2021 21:02
The most basic deadlock example (recursive)
#include <iostream>
#include <mutex>
std::mutex mtx;
void deadlock() {
std::lock_guard<std::mutex> _mu(mtx);
std::cout<<"Deadlock incoming\n";
deadlock();
}
@1502shivam-singh
1502shivam-singh / MultiLevelQueue.cpp
Created April 2, 2021 22:39
Multi-level queue scheduling (Using FCFS and Round Robin scheduling on individual queues)
#include <iostream>
#include <queue>
#include <vector>
#include <unordered_map>
typedef uint32_t uint;
struct process {
uint32_t pid;
uint32_t atime;
@1502shivam-singh
1502shivam-singh / customAttributes.js
Last active February 17, 2021 23:36
Snippet to add a custom attribute to each vertex of buffergeometry in three.js
// Snippet to look under a buffergeometry and add a custom attribute for each vertex
let geometry = new THREE.PlaneBufferGeometry(5, 5, 5, 5); // for example
let count = geometry.attributes.position.length;
let arrSize = new THREE.BufferAttribute(new Float32Array(count), 1); // Here "1" is the places the attribute would take
for(let i=0;i<arrSize.count; i++){
arrSize.array[i] = Math.random(); // Assigning a random value as attribute here
}
geometry.addAttribute("aSize", arrSize, 1); // Access in shader later