Skip to content

Instantly share code, notes, and snippets.

View ruancarvalho's full-sized avatar

Ruan Carvalho ruancarvalho

View GitHub Profile
@ruancarvalho
ruancarvalho / cmd.md
Last active February 18, 2020 19:33
linkd

Get Media

let media = $('#vjs_video_3_html5_api')[0].src;
copy(media)

Get Transcript

@ruancarvalho
ruancarvalho / screencasting.md
Last active September 26, 2019 21:34 — forked from Gregg/gist:968534
Web Dev Academy's Screencasting Framework

Screencasting Framework

The following document is a written account of the Web Dev Academy screencasting framework, based on Code School's framework. It should be used as a reference for our video tutorials.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@ruancarvalho
ruancarvalho / price.js
Created August 9, 2019 14:16
Price Calc
/**
* WIP
* Custo Total / (100% - ( % taxa adm + % margem + % imposto)
*/
const calcFinalPrice = function(cost = 0.0, adm = 0.0, profit = 0.0, tax = 0.0) {
}
@ruancarvalho
ruancarvalho / commands.sh
Created May 8, 2019 14:48
my ubuntu commands
#resize window to size
wmctrl -l
wmctrl -ir <id> -e 0,960,0,1280,720
const insertionSort = function(A) {
for (let j = 1; j <= A.length; j++) {
let key = A[j];
let i = j-1;
while (i >= 0 && A[i] > key) {
A[i+1] = A[i];
i = i-1;
A[i+1] = key;
}
@ruancarvalho
ruancarvalho / ubuntu-resize-window.md
Last active March 4, 2019 20:31
Resize windows in Ubuntu

Install WMCtrl:

$ sudo apt-get install wmctrl

Use this format to resize windows in desktop:

wmctrl -r :ACTIVE: -e g,x,y,w,h
@ruancarvalho
ruancarvalho / .bashrc
Last active December 6, 2019 22:38
bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
...
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-exemplo">
Abrir modal
</button>
...
<div class="modal fade" id="modal-exemplo">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
<h4 class="modal-title">Titulo do Modal</h4>
</div>
(function($){
nomeDaFuncao = function() {
// seu codigo aqui
};
})(jQuery);