Profile

Cover photo
Ori Peleg
297 followers
AboutPostsPhotos

Stream

 
It turns out that formatting a floating-point "seconds since 1970" is not only numerically ascending, but also lexicographically ascending, at least until the year 2286. Ruby proof:

puts Time.at(Time.now.to_i.to_s.gsub(/./, '9').to_i)

With +Gahl Saraf

  #anotherprogrammingshortcut  
1
Add a comment...

Ori Peleg

Shared publicly  - 
 
How to change YADR's colorscheme (in case someone searches for it): shown by example with the 'Distinguished' color scheme, which is very dark-background-terminal-friendly:

# add the color scheme via pathogen
~/.yadr/bin/yadr/yadr-vim-add-plugin -u Lokaltog/vim-distinguished.git

# update vim configuration
vim ~/.yadr/vim/settings/yadr-appearance.vim
# change 'colorscheme solarized' to 'colorscheme distinguished'
(cd ~/.yadr; git commit -m "updated colorscheme" vim/settings/yadr-appearance.vim)


Obligatory links:
YADR - https://github.com/skwp/dotfiles
Distinguished - https://github.com/Lokaltog/vim-distinguished
1
Add a comment...
 
Is there a changelog for release 22.6 of the Android SDK Tools? Sorry for the spam if there is and I missed them.
2
Ori Peleg's profile photoRiccardo Ciovati's profile photo
2 comments
 
+Riccardo Ciovati ACK, thanks. Wasn't there before. 
Add a comment...

Ori Peleg

Shared publicly  - 
 
Instantly migrate to a secure password hashing scheme
So your site uses terrible password hashing scheme H1 (perhaps MD5), and you want to migrate to secure password hashing scheme H2 (preferably scrypt , but possibly bcrypt or PBKDF2). The standard migration approach is to upgrade users as they log in and ent...
So your site uses terrible password hashing scheme H1 (perhaps MD5), and you want to migrate to secure password hashing scheme H2 (preferably scrypt, but possibly bcrypt or PBKDF2). The standard migration approach is to upgra...
1
Add a comment...

Ori Peleg

Shared publicly  - 
 
Awesome, streamlined #git  plugin for working with rebased topic branches and pull requests. Much better than git-flow IMO.

Run each command with '-h' to see the options.
1
Add a comment...

Ori Peleg

Shared publicly  - 
 
Android: backup and restore an app's data during development
During development, having an app with a realistic configuration and data set is really useful. Here's a trick that can help. Connect a device with the app configured with lots of good data, turn USB debugging on, and then: adb backup com.example.mypackage ...
During development, having an app with a realistic configuration and data set is really useful. Here's a trick that can help. Connect a device with the app configured with lots of good data, turn USB debugging on, and then: a...
2
1
Ori Peleg's profile photo
Add a comment...
Have them in circles
297 people

Ori Peleg

OkHttp  - 
 
I would like to log actual request and response sizes on the wire, taking into account header size, gzip, etc. I don't mind not taking the TCP/IP overhead into account.
Is this possible with OkHttp? 
1
Jake Wharton's profile photoOri Peleg's profile photo
2 comments
 
Wow, awesome! 
Add a comment...

Ori Peleg

Shared publicly  - 
 
Fuzzy version of Yaron Budowski presenting at DevFest
1
Add a comment...

Ori Peleg

Tips and Tricks  - 
 
Small tip on quickly setting up data in an application for development.

Requires android:allowBackup="true" on the <application> element in the manifest, which is the default.
 
Android: backup and restore an app's data during development
During development, having an app with a realistic configuration and data set is really useful. Here's a trick that can help. Connect a device with the app configured with lots of good data, turn USB debugging on, and then: adb backup com.example.mypackage ...
During development, having an app with a realistic configuration and data set is really useful. Here's a trick that can help. Connect a device with the app configured with lots of good data, turn USB debugging on, and then: a...
3
Add a comment...
People
Have them in circles
297 people
Work
Occupation
Programmer and technical guy
Story
Introduction
Programmer, tinkerer, grappler.
Links
Contributor to