Skip to content

Instantly share code, notes, and snippets.

Avatar

Joe Saavedra jmsaavedra

View GitHub Profile
@jmsaavedra
jmsaavedra / flowOrderToslack.liquid
Last active Jun 15, 2022
Shopify Liquid for Flow > Slack
View flowOrderToslack.liquid
{% 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 Aug 25, 2022
Install ffmpeg with h264 OSX 10.14
View installffmpeg.md
@jmsaavedra
jmsaavedra / ffmpeg_cmds.md
Last active Dec 14, 2022
Collection of ffmpeg commands
View ffmpeg_cmds.md

Collection of Useful ffmpeg Commands

  • extract x frame of video
ffmpeg -i <input> -vf "select=eq(n\,<framenumber>)" -vframes 1 out.png

@jmsaavedra
jmsaavedra / tripleClick.ino
Last active Nov 15, 2017
triple click detection
View tripleClick.ino
/* 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;
View gist:fb4b080580d2706c143c8aba2a293ab8
/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
View 20p-rpi-setup.md
@jmsaavedra
jmsaavedra / .eslintrc
Created May 18, 2016 — 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).
View .eslintrc
{
// 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
View raw_neopixel_simblee.ino
// 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;
@jmsaavedra
jmsaavedra / chromium.md
Last active May 1, 2019
install chromium on raspbian jessie
View chromium.md

install chromium on raspbian jessie

get these chromium debs (THEY ARE ALSO IN THIS FOLDER):

wget https://dl.dropboxusercontent.com/u/87113035/chromium-browser-l10n_45.0.2454.85-0ubuntu0.15.04.1.1181_all.deb
wget https://dl.dropboxusercontent.com/u/87113035/chromium-browser_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb
wget https://dl.dropboxusercontent.com/u/87113035/chromium-codecs-ffmpeg-extra_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb
@jmsaavedra
jmsaavedra / info.md
Last active Nov 6, 2015
startup script resources for ubuntu
View info.md

adding an init.d script:

  1. look at /etc/init.d/skeleton for the script template
  2. after creating your own, chmod a+x myscript
  3. sudo mv myscript /etc/init.d
  4. update-rc.d myscript.....tba...

OR

...tba...