Skip to content

Instantly share code, notes, and snippets.

View jmsaavedra's full-sized avatar

Joe Saavedra jmsaavedra

View GitHub Profile
@jmsaavedra
jmsaavedra / mongo-cli-reference.md
Last active January 24, 2017 01:12
mongodb cli quick reference + setup guide

###mongodb quick CLI reference

db backup and restore

from any directory on host machine, export entire db

$ mongodump -db myDatabaseName #OSX
$ mongodump --db myDatabaseName -o C:\Users\someuser\Desktop #win
@jmsaavedra
jmsaavedra / ffmpeg_install.md
Last active February 29, 2024 09:36
Install FFmpeg on a Linux Box

Install FFmpeg via CLI on Linux box

These steps walk through installing a static binary of any ffmpeg version on to your linux machine. If you want to compile from source, there are several ways to do so. Here's the official guide. Tested and works on an AWS EC2 Ubuntu instance, but should work on any Linux machine.

  • SSH into your instance and become root
@jmsaavedra
jmsaavedra / cURLinOF.cpp
Last active December 7, 2015 07:39
cURL POST Request with ofSystem from openFrameworks
string completeUpdate = "{\"requests\": [{\"method\": \"PUT\",\"path\": \"/1/classes/"+dbName+"/"+displayObjectId+"\",\"body\": "+ updateObj + "},{\"method\": \"PUT\",\"path\": \"/1/classes/"+dbName+"/"+displayObjectId+"\",\"body\": " + updateObj2 + "}]}";
string someId = "someIdString";
pushData(someId, completeUpdate);
void pushData(string someIdStr, string updateObjectStr){
cout << "updating parse. objectId: "<<someIdStr<<endl;
cout << "\tupdate object: "<<updateObjectStr<<endl;
import java.io.*;
import java.util.*;
/**
made this work.
- joe
@jmsaavedra
jmsaavedra / simpleserial.ino
Created October 3, 2015 22:18
Teensy Serial Controller
/******
* Teensy connected to Powerswitch Tail 2
*/
#define PST_1 3 //powerswitch tail pin 1
#define PST_2 4 //powerswitch tail pin 2
#define LED 13 //teensy 3.0 on-board LED
void setup() {
Serial.begin(9600);
@jmsaavedra
jmsaavedra / info.md
Last active November 6, 2015 21:09
startup script resources for ubuntu

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...

@jmsaavedra
jmsaavedra / chromium.md
Last active May 1, 2019 20:15
install chromium on raspbian jessie

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
// 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 / .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