Skip to content

Instantly share code, notes, and snippets.

View jmsaavedra's full-sized avatar

Joe Saavedra jmsaavedra

View GitHub Profile
@jmsaavedra
jmsaavedra / contracts...IoSingleTransferExt.sol
Created September 11, 2023 23:24
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @author: Infinite Objects
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "@manifoldxyz/creator-core-solidity/contracts/core/IERC1155CreatorCore.sol";
import "@manifoldxyz/creator-core-solidity/contracts/extensions/ERC1155/IERC1155CreatorExtensionApproveTransfer.sol";
@jmsaavedra
jmsaavedra / .deps...npm...@manifoldxyz...creator-core-solidity...contracts...core...CreatorCore.sol
Created September 11, 2023 23:24
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @author: manifold.xyz
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
@jmsaavedra
jmsaavedra / flowOrderToslack.liquid
Last active June 15, 2022 12:22
Shopify Liquid for Flow > Slack
{% assign order_num = order.name | remove: '#' %}
{% assign order_modulo = order_num | modulo:1000 %}
{% assign customer_moments_ct = order.customerJourneySummary.momentsCount %}
{% assign note_len = order.note | size %}
{% assign billingco_len = order.billingAddress.company | size %}
{% assign customer_firstvisit_refurl_len = order.customerJourneySummary.firstVisit.referrerUrl | size %}
{% assign customer_firstvisit_desc_len = order.customerJourneySummary.firstVisit.sourceDescription | size %}
{% assign customer_lastvisit_refurl_len = order.customerJourneySummary.lastVisit.referrerUrl | size %}
{% assign customer_lastvisit_desc_len = order.customerJourneySummary.lastVisit.sourceDescription | size %}
{% assign order_refurl_len = order.referrerUrl | size %}
@jmsaavedra
jmsaavedra / installffmpeg.md
Last active August 25, 2022 07:01
Install ffmpeg with h264 OSX 10.14
@jmsaavedra
jmsaavedra / ffmpeg_cmds.md
Last active May 8, 2024 20:14
Collection of ffmpeg commands

Collection of Useful ffmpeg Commands

  • optimize with faststart (for mobile web)
  • crf (quality) goes from 0 (lossless) - 50 (very poor).
ffmpeg -i input.mp4 -crf 30 -profile:v baseline -level 3.0 -movflags +faststart -an output.mp4

@jmsaavedra
jmsaavedra / tripleClick.ino
Last active November 15, 2017 20:22
triple click detection
/* https://github.com/JChristensen/Timer */
#include <Timer.h>
Timer t_press;
int POWER_SNAP_BTN = 8;
int LED_1 = 13;
int LED_2 = 3;
int pressCount = 0;
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xde:m -Ulfuse:w:0xff:m
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/jmsaavedra/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
@jmsaavedra
jmsaavedra / .eslintrc
Created May 18, 2016 01:37 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
// WS2812_RFduino_Test
// By Thomas Olson
// No complicated Pixel Library needed.
// Tested with WS2812B 4 pin versions.
// Modified by Sam Decrock to resemble NeoPixel API
// Modified by http://jos.ph to incorporate more of NeoPixel examples
// 20160510 ... verified works with Arduino 1.6.5 and simblee module
// >>> using 3.3v > 5v level shifter between pin 6 and NeoPixels
const int ws2812pin = 6;