Skip to content

Instantly share code, notes, and snippets.

View anataliocs's full-sized avatar
👨‍💻
Working with Soroban Rust smart contracts

Chris Anatalio anataliocs

👨‍💻
Working with Soroban Rust smart contracts
View GitHub Profile
@anataliocs
anataliocs / list-of-curl-options.txt
Created July 18, 2024 17:58 — forked from eneko/list-of-curl-options.txt
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password
@anataliocs
anataliocs / minmax.rs
Created June 16, 2024 04:07
Rust minmax function with array manipulation
fn miniMaxSum(arr: &[i32]) {
let len = arr.len();
let mut list: Vec<i64> = vec![];
for n in 0..len {
let &sum = &arr.iter()
.enumerate()
.filter(|(index, &y)| !index.eq(&n))
.map(|(i, &y)| i64::from(y))
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
contract Primitives {
bool public boo = true;
/*
uint stands for unsigned integer, meaning non negative integers
different sizes are available
uint8 ranges from 0 to 2 ** 8 - 1
gid:S8rNiPpqbqjzkYrsk6yH7f
@anataliocs
anataliocs / truffle-config.js
Created May 2, 2022 20:54
truffle-config.js
const path = require("path");
const HDWalletProvider = require("@truffle/hdwallet-provider");
const mnemonic = "";
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
contracts_build_directory: path.join(__dirname, "client/src/contracts"),
networks: {
@anataliocs
anataliocs / yolo-mode chrome(MacOS)
Created March 4, 2021 20:57
Open a new Chrome window in incognito with a totally separate user profile in a new window with the following disabled: Web security Cache and Various flags about http security and CORS
open -na Google\ Chrome --args --user-data-dir=/tmp/temporary-chrome-profile-dir --disable-web-security --incognito --media-cache-size=1 --disk-cache-size=1 --new-window --allow-insecure-localhost --ignore-certificate-errors-spki-list --unsafely-treat-insecure-origin-as-secure --aggressive-cache-discard --cors-exempt-headers
@anataliocs
anataliocs / java
Created September 9, 2019 21:32
toString method to display a well-formatted 2d array in Java
@Override
public String toString() {
return lineSeparator() + Arrays.stream(matrix)
.map(a -> Arrays.toString(a) + lineSeparator())
.collect(Collectors.joining(lineSeparator()));
}

Keybase proof

I hereby claim:

  • I am anataliocs on github.
  • I am anataliocs (https://keybase.io/anataliocs) on keybase.
  • I have a public key ASDzqcwpJiwvYsmmnKBmzLLbYoL_2mimQGdR0vzjBTc9UAo

To claim this, I am signing this object: