Skip to content

Instantly share code, notes, and snippets.

View rafbgarcia's full-sized avatar

Rafael Garcia rafbgarcia

View GitHub Profile
<!DOCTYPE html>
<html ng-app="App">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
<script>
angular.module('App', [])
.controller('FormCtrl', function () {
var ctrl = this;
@rafbgarcia
rafbgarcia / styles.css
Created January 13, 2017 20:48
responsive video
.video__iframe__curso {
position: relative;
height: 0;
padding-bottom: 56.38%;
width: 100%;
}
.video__iframe__curso iframe {
position: absolute;
top: 0;
@rafbgarcia
rafbgarcia / estilos.css
Created January 13, 2017 10:28
Centralizando a página com CSS
div {
width: 500px;
margin-left: auto;
margin-right: auto;
}
# Write some code, that will flatten an array of arbitrarily nested arrays of integers into a flat array of integers.
# e.g. [[1,2,[3]],4] -> [1,2,3,4].
RSpec.describe "flatten" do
it "should flatten an array" do
expect(flatten([[1,2,[3]],4])).to eq [1,2,3,4]
end
end
def flatten(array)
@rafbgarcia
rafbgarcia / .gitconfig
Last active March 25, 2017 19:31
gitconfig
[user]
name = YOUR NAME
email = YOUR EMAIL
[color]
ui = auto
[alias]
st = status -sb
ci = commit -m