Skip to content

Instantly share code, notes, and snippets.

View koolamusic's full-sized avatar
🎯
Focusing

BLS12-381 koolamusic

🎯
Focusing
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@koolamusic
koolamusic / hex-colors.txt
Created June 20, 2023 11:35 — forked from aileftech/hex-colors.txt
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
#ACAD1A
#B0BB1E
#DEBB1E
#AB1DED
#ACAC1A
#ACCEDE
#AC1D1C
#BAB1ED
#BA0BAB
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@koolamusic
koolamusic / .block
Created August 12, 2022 17:18 — forked from mbostock/.block
Lab and HCL Color Spaces
license: gpl-3.0
const createDelegateBySigMessage = (compAddress, delegatee, expiry = 10e9, chainId = 1, nonce = 0) => {
const types = {
EIP712Domain: [
{ name: 'name', type: 'string' },
{ name: 'chainId', type: 'uint256' },
{ name: 'verifyingContract', type: 'address' },
],
Delegation: [
{ name: 'delegatee', type: 'address' },
{ name: 'nonce', type: 'uint256' },
@koolamusic
koolamusic / wait_for_http_200.sh
Created September 24, 2021 16:04 — forked from rgl/wait_for_http_200.sh
Wait for an HTTP endpoint to return 200 OK with Bash and curl
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done'
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76
@koolamusic
koolamusic / erc20-token-sample.sol
Created February 20, 2021 15:53 — forked from bajcmartinez/erc20-token-sample.sol
Necessary code to generate an ERC20 Token
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Sample token contract
//
// Symbol : LCST
// Name : LCS Token
// Total supply : 100000
// Decimals : 2
// Owner Account : 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe
@koolamusic
koolamusic / build.sh
Created November 12, 2020 06:30 — forked from bobbytables/build.sh
Protocol Buffer build script for multiple folders
#!/usr/bin/env bash
# This script is meant to build and compile every protocolbuffer for each
# service declared in this repository (as defined by sub-directories).
# It compiles using docker containers based on Namely's protoc image
# seen here: https://github.com/namely/docker-protoc
set -e
REPOPATH=${REPOPATH-/opt/protolangs}
CURRENT_BRANCH=${CIRCLE_BRANCH-"branch-not-available"}
@koolamusic
koolamusic / service.js
Created October 17, 2020 19:35 — forked from cadebward/service.js
Remove `__v` and `_id` from MongoDB
import mongoose, {Schema} from 'mongoose'
export const ServiceSchema = new Schema({
displayName: {type: String, required: true, unique: true}
})
ServiceSchema.set('toObject', {
transform: function (doc, ret) {
ret.id = ret._id
delete ret._id
@koolamusic
koolamusic / a2dp.py
Created June 5, 2019 06:12 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .