Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am nighthawk24 on github.
  • I am adi (https://keybase.io/adi) on keybase.
  • I have a public key whose fingerprint is D3BD D750 CCC4 C115 F896 C81C 7372 CCC7 DB3D 3C13

To claim this, I am signing this object:

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns                     on recent CPU
L2 cache reference ........................... 7 ns                     14x L1 cache
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns                     20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory

At over 23k, the current email regexp is getting pretty big. That doesn't include the nested comment
stripping, which adds just over 1k, or the domain literal (IPv4 & IPv6) rules, which add another 1k.
It's a testament to PCRE that it even runs.
(((?:(?:(?:(?:(?:(?:[\x20\x09]*(?:\x0d\x0a))?[\x20\x09]+)|(?:[\x20\x09]+(?:(?:\x0d\x0a)[\x20\x09]+)*
))?(?:\x28(?:(?:(?:(?:[\x20\x09]*(?:\x0d\x0a))?[\x20\x09]+)|(?:[\x20\x09]+(?:(?:\x0d\x0a)[\x20\x09]+
)*))?(?:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|[\x21-\x27\x2A-\x5b\x5d-\x7e])|(?:\x5c(?:\x0a*\x0d*[\x00
-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)|(?:\x5c[\x00-\x7f]))))*(?:(?:(?:[\x20\x09]*(?:\x0d\x0a))?[\x20\x0
Verifying myself: My Bitcoin username is +adi. https://onename.io/adi

Keybase proof

I hereby claim:

  • I am stevegraham on github.
  • I am sg (https://keybase.io/sg) on keybase.
  • I have a public key whose fingerprint is DB6D 0AB8 BEA8 3D90 E1FC B5A8 9E83 7DE0 28E3 4D82

To claim this, I am signing this object:

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
LG G3 @ 1x: 360×640
Nexus 5 @ 1x: 360×640
Galaxy S5 @ 1x: 360×640
Galaxy S4 @ 1x: 360×640
Galaxy S3 @ 1x: 360×640
Galaxy Note 3 @ 1x: 360×640
Galaxy Note @ 1x: 400×640
HTC One M7 @ 1x: 360×640
HTC One M8 @ 1x: 360×640
Nexus 4 @ 1x: 384×640
Tar, (short for tape archiver), is a versital tool that can be used for archiving files to disk or any other device as easily as tape. In fact, if you don't work in a data center, you will probably never use tar with a tape drive.
Often, Unix/BSD/Linux files and source code are distributed in a zipped tar file, sometimes called a tarball. Extensions for tarballs are usually .tgz or .tar.gz (gz because it was compressed using gzip, the free GNU zip program). Rarely, you may run across a tar file that is not compressed and has an extension of simply .tar.
Here are some common uses for tar. If you pass a directory or a wildcard to tar, it will include all subdirectories in the tar file by default.
Create a gzipped tar archive
tar czvf backup.tgz files-to-backup
Create a gzipped tar archive, preserving file permissions
tar czvpf backup.tgz files-to-backup
@nighthawk24
nighthawk24 / ACH Codes
Created May 14, 2014 17:19
Provided by ZenPayroll
ACH Return Codes
R00 Manually Cancelled
R01 Insufficient Funds
R02 Account Closed
R03 No Account/Unable to Locate Account
R04 Invalid Account Number Structure
R05 Unauthorized Debit to Consumer Account Using Corporate SEC Code
R06 Return per ODFI's Request
R07 Authorization Revoked by Customer
R08 Payment Stopped
@nighthawk24
nighthawk24 / Getting Started with Android Design & Development
Last active August 29, 2015 14:01
Getting Started with Android Design & Development
Notice the inclusion of both Design & Development as Android App creation includes heavy focus on User Interface design
with all possible kinds of objects like buttons, imageviews, layouts, etc; unless the Android project is focused on
designing a service based component only, like web proxy, background sound calibration, background data collection and
uploading (having no User Interface).
Prerequisites:
- Basic Java knowledge: http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Java/Chapter01/features.html
- Basic XML, drag and drop UI Building
- Comfort of using IDEs: Eclipse(Google ADT for Android) or IntelliJ IDEA(Android Studio for Android)
- Basic SQL Database knowledge: Vogella is a great resource http://www.vogella.com/tutorials/AndroidSQLite/article.html