Skip to content

Instantly share code, notes, and snippets.

=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@pietrop
pietrop / transcribe.js
Created May 18, 2016 22:09 — forked from antiboredom/transcribe.js
Transcribe video/audio using IBM Watson
var request = require('request');
var fs = require('fs');
var sox = require('sox');
var spawn = require('child_process').spawn;
var WATSON_USER = '';
var WATSON_PASS = '';
var url = 'https://stream.watsonplatform.net/speech-to-text/api/v1/recognize';
@pietrop
pietrop / Sample Contract - Software Deliverable
Created September 24, 2017 15:58 — forked from jboeke/Sample Contract - Software Deliverable
Sample Contract - Software Deliverable
## For educational purposes only! Not a substitute for individualized advice from a qualified legal practitioner. ##
SOFTWARE CONSULTING AGREEMENT
THIS AGREEMENT is entered into on <contract date> by and between Avie, LLC, (hereinafter "Developer") and <client company>, (hereinafter "Company").
RECITALS
WHEREAS, Company wishes to retain Developer to develop certain <software type> software (hereinafter defined and referred to as “Software”); and
@pietrop
pietrop / GitHub-Forking.md
Created February 26, 2018 10:02 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@pietrop
pietrop / adr_template.md
Created October 29, 2018 10:25 — forked from iaincollins/adr_template.md
ADR Template

[short title of solved problem and solution]

  • Status: [accepted | superseded by ADR-0005 | deprecated | …]
  • Deciders: [list everyone involved in the decision]
  • Date: [YYYY-MM-DD when the decision was last updated]

Technical Story: [description | ticket/issue URL]

Context and Problem Statement

@pietrop
pietrop / pull_request_template.md
Created October 29, 2018 10:26 — forked from iaincollins/pull_request_template.md
Pull Request Template

Summary

A sentence describing the reason for the changes in this pull request.

Description

A few sentences / bullet points describing the goals of this change and the implementation.

Link to Issue

@pietrop
pietrop / ffmpeg_mkv_mp4_conversion.md
Created December 12, 2019 17:31 — forked from jamesmacwhite/ffmpeg_mkv_mp4_conversion.md
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

Pluck Unique Values from Array of Javascript Objects

Implementation

const pluck = key => array => Array.from(new Set(array.map(obj => obj[key])));

Usage

@pietrop
pietrop / ffmpeg.md
Created February 5, 2021 18:27 — forked from dvlden/ffmpeg.md
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@pietrop
pietrop / The Technical Interview Cheat Sheet.md
Created May 11, 2021 21:29 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\