Skip to content

Instantly share code, notes, and snippets.

View curl-outputs
➜ curl -o /dev/null "https://ucs-mbst-pub-ue1.s3.amazonaws.com/appmanifest/3/manifest.json" -k -H "Vary: Origin" -D- -Ss
HTTP/1.1 200 OK
x-amz-id-2: 2iaSI8hXgFUO9S4CJ6A1MYGDTTl1N9aJBGStKchewoQPJNqlIA4db8to71yiM4XtRi8BfFqbb1Y=
x-amz-request-id: C51E73B9918557B5
Date: Thu, 21 Jun 2018 07:21:46 GMT
Last-Modified: Mon, 30 Apr 2018 16:22:40 GMT
ETag: "368ba0ff1d678040b159efc1e609cb3e"
x-amz-server-side-encryption: AES256
Cache-Control: public,max-age=536112000
x-amz-meta-created-date: Thu, 01 Dec 2016 02:16:29 GMT
@fabianuribe
fabianuribe / .vimrc
Created Apr 1, 2016
Development environment
View .vimrc
execute pathogen#infect()
" don't bother with vi compatibility
set nocompatible
" enable syntax highlighting
syntax enable
" configure Vundle
filetype on " without this vim emits a zero exit status, later, because of :ft off
filetype off
@fabianuribe
fabianuribe / heap.js
Last active Apr 17, 2020
The Heap Data Structure in Javascript
View heap.js
/**
* heap.js
* A module that implements a Doubly Linked List data Structure
* @module LinkedList
*/
module.exports = Heap;
var TYPE_MIN = 'min';
var TYPE_MAX = 'max';
/**
@fabianuribe
fabianuribe / linked-list.js
Last active Apr 10, 2016
The Doubly Linked List Data Structure in Javascript
View linked-list.js
/**
* linked-list.js
* A module that implements a Doubly Linked List data Structure
* @module LinkedList
*/
module.exports = LinkedList;
/**
* Represents a Linked List Node.
* @param {Object} data
View lucky_ajax.md
@fabianuribe
fabianuribe / index.html
Created Aug 12, 2013 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
View index.html
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
View scrapper_test.rb
require 'nokogiri'
doc = Nokogiri::HTML(File.open('post.html'))
def extract_usernames(doc)
doc.search('.comhead > a:first-child').map do |element|
p element.inner_text
end
View P5: OO Inheritance.rb
class Vehicle
attr_reader :status, :wheels
def initialize(args)
@color = args[:color]
@wheels = args[:wheels]
@status = :stopped
end
View rpn.rb
# Create an RPNCalculator class which can evaluate expressions written in Reverse Polish notation.
# It should have an evaluate instance method which takes as its input a valid RPN expression and returns its evaluation. Your calculator only needs to handle addition, multiplication, and subtraction (not division).
# Operators and numbers should be separated by a single space.
# For example,
# calc = RPNCalculator.new
@fabianuribe
fabianuribe / sudoku.rb
Last active Dec 20, 2015
Sudoku solver version 1
View sudoku.rb
sudoku_string = "003020600900305001001806400008102900700000008006708200002609500800203009005010300"
sudoku_array = sudoku_string.split('')
rows_array = Array.new(9){ sudoku_array.shift(9) }
rows_array.each{|row| p row}
box_rows_array = []
# p rows_array
You can’t perform that action at this time.