- Herşey bir
Object
(Nesne) - Her
Object
BasicObject
den türemiş. (Objective-C NSObject gibi...) Object.methods
ile o nesneye ait tüm method'larObject.methods.inspect
string olarak method'lar- Mutlaka bir şey geriye döner. Hiçbir şey dönmese
nil
döner.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
require 'benchmark' | |
n = 1_000_000 | |
start_date = Date.new(2012, 01, 01) | |
end_date = Date.new(2012, 03, 01) | |
act_date = Date.new(2012, 02, 01) | |
Benchmark.bm(10) do |x| | |
x.report('include?') do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE "localhost:9200/test" | |
curl -XPUT "localhost:9200/test" -d '{ | |
"mappings": { | |
"doc": { | |
"properties": { | |
"price": { | |
"type": "long" | |
}, | |
"colour": { | |
"type": "string", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Deleting a parent when you have `dependent: :destroy` on the server | |
// given `parent` a parent record | |
// `children` the parent's children | |
var childrenTransaction, parentTransaction; | |
childrenTransaction = this.get('store').transaction(); | |
childrenTransaction.add(parent); | |
parent.deleteRecord(); | |
parentTransaction.add(parent); |
- This script lets you set up and use a temporary DigitalOcean droplet to download torrent files.
- Once downloaded, they can be streamed down to your local machine.
- This uses
transmission-cli
for the torrent client, andnginx
to serve files.
- This assumes that you have a DigitalOcean account and tugboat set up, as well as
seedbox-setup.sh
present in the current directory.
OlderNewer