Skip to content

Instantly share code, notes, and snippets.

View colejhudson's full-sized avatar
🏃
roonin

Cole Hudson colejhudson

🏃
roonin
View GitHub Profile
@emlazzarin
emlazzarin / bonfire_books.md
Last active April 26, 2024 19:18
pmarca's books for understanding The Bonfire Of The Universities
title author link
1 The Captive Mind Czesław Miłosz Amazon
2 Private Truths, Public Lies: The Social Consequences of Preference Falsification Timur Kuran Amazon
3 When Reason Goes on Holiday: Philosophers in Politics Neven Sesardić Amazon
4 Intellectuals and Society Thomas Sowell Amazon
5 Intellectuals: From Marx and Tolsoy to Sartre and Chomsky Paul Johnson Amazon
6 The Making of an American Thinking Class: Intellectuals and Intelligentsia in Puritan Massachusetts Darren Staloff [Amazon](ht
@ibireme
ibireme / kpc_demo.c
Last active July 16, 2024 10:53
A demo shows how to read Intel or Apple M1 CPU performance counter in macOS.
// =============================================================================
// XNU kperf/kpc demo
// Available for 64-bit Intel/Apple Silicon, macOS/iOS, with root privileges
//
//
// Demo 1 (profile a function in current thread):
// 1. Open directory '/usr/share/kpep/', find your CPU PMC database.
// M1 (Pro/Max/Ultra): /usr/share/kpep/a14.plist
// M2 (Pro/Max): /usr/share/kpep/a15.plist
// M3: /usr/share/kpep/as1.plist
@shawwn
shawwn / What happens when you allocate a JAX tensor on a TPU.md
Last active April 15, 2023 04:11
JAX C++ stack trace walkthrough for TpuExecutor_Allocate
@vnavascues
vnavascues / AccuweatherConsumer.sol
Created October 25, 2021 17:57
An AccuWeather Consumer contract
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol";
/**
* **** Data Conversions ****
*
* countryCode (bytes2)
* --------------------
@patrickd-
patrickd- / cheatsheet.md
Last active March 20, 2024 23:13
Solidity – Compilable Cheatsheet
@adilanchian
adilanchian / WavePortal.sol
Last active November 2, 2023 06:07
Section 2: Write and deploy your WavePortal smart contract to a local Ethereum network
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "hardhat/console.sol";
contract WavePortal {
uint256 totalWaves;
constructor() {
@axic
axic / ReedemableNFT.sol
Created September 14, 2021 22:00
ReedemableNFT, where a curator can issue a redeemable cheque for minting a given token.
// ReedemableNFT, where a curator can issue a redeemable cheque for minting a given token.
//
// The message to be signed is an EIP-712 compatible structured data:
// struct RedeemableNFT {
// address recipient;
// uint256 tokenId;
// }
//
// This message can then signed by the curator and given to the user who submits it.
// The validity of the signature is checked according to EIP-1271 if the signer is a contract,
@JofArnold
JofArnold / BoredApeYachtClub.sol
Last active April 9, 2023 12:44
The Bored Ape Yacht Club (BAYC) Solidity Smart Contract GitHub
/**
*Submitted for verification at Etherscan.io on 2021-04-22
*/
// File: @openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
interface IFlashLoanPool {
function flashLoan(uint256 amount) external;
function deposit() external payable;
function withdraw() external;
pragma solidity >=0.4.22 <0.7.0;
contract AttendanceRegister {
struct Student{
string name;
uint class;
}
event Added(string name, uint class, uint time);
mapping(uint => Student) public register; // roll number => student details