kubernetes-cli
(v1.10.3) taken as example
- Downgrade Homebrew to the commit which upgrades the formula to the specific version that we want
$ cd "$(brew --repo homebrew/core)"
$ git log Formula/kubernetes-cli.rb
...
Options:
zip -ejr [path_of_new_file_with_name] [path_to_file_to_zip]
Lazy
a = [1,2,3,4,2,5].lazy.map { |x| x * 10 }.select { |x| x > 30 } #=> no evaluation and creations of arrays
a.to_a #=> [40, 50], evaluation performed - no intermediate arrays generated.
Eager
class NumberGenerator
VERSION = "0.1.0".freeze
attr_reader :message_receiver
def initialize(message_receiver)
@message_receiver = message_receiver
end
du -h --max-depth=1 | sort -hr
require 'socket'
server = TCPServer.new("127.0.0.1", 2000)
loop do
Thread.start(server.accept) do |client|
client.puts "Hello !"
client.puts "Time is #{Time.now}"
client.close
end
import React, { Component, PropTypes } from 'react';
import { ListGroup } from 'react-bootstrap';
import Todo from 'components/todo';
export default class TodoList extends Component {
static propTypes = {
todos: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.number,