Skip to content

Instantly share code, notes, and snippets.

View EnriqCG's full-sized avatar
🏗️
Building..

Enrique Carpintero EnriqCG

🏗️
Building..
  • Remote
View GitHub Profile
@EnriqCG
EnriqCG / findIndex.js
Created January 19, 2023 16:20
Gets the position of the first zero bit (Little-Endian) of a 255 bit number
/**
* Gets the position of the first zero bit (Little-Endian) of a 255 bit number.
*
* 001010111111111
* ^
* By doing an AND operation between the input and it's 2's complement, we get a
* number whose single 1 bit is the first zero byte in the sequence.
*/
const { constants, BigNumber } = require("ethers");
@EnriqCG
EnriqCG / openstack_api.py
Created September 9, 2019 11:14
Openstack client for creating and destroying instances
"""Openstack client API for creating and destroying instances with the Nova API
Date: 04/09/2019
Author: Enrique Carpintero
"""
import requests
import json
class OpenStackAPI:
@EnriqCG
EnriqCG / CSGO Server Events
Last active January 9, 2021 15:21
CS:GO Demo GameEvents
achievement_earned
announce_phase_end
begin_new_match
bomb_beep
bomb_begindefuse
bomb_beginplant
bomb_defused
bomb_dropped
bomb_exploded
bomb_pickup