Skip to content

Instantly share code, notes, and snippets.

View iraycd's full-sized avatar
🎯
Focusing

Ray Ch iraycd

🎯
Focusing
View GitHub Profile
@iraycd
iraycd / jobs.md
Last active August 29, 2015 14:15
Qualification in Ninjaas by position.

##Internship : Making an app

  • If you already have a decent enough app. You are quilified. But see the below coditions.
  • Should have a GitHub or Bitbucket Profile. Understand basics of GIT.
  • Basics knowledge about how server, cloud and mobile work.
  • You should know one of these technology
    • Node.js, Python(Django) or Go.
    • Android
    • iOS Developers
    • Go Lang

Start your rethinkdb instance with this flag: --bind all (or bind=all in the configuration file for your instance)

Block external access to the web UI with these two commands: sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j DROP sudo iptables -I INPUT -i eth0 -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT

Install nginx: sudo apt-get install nginx

@iraycd
iraycd / indianStates.js
Created April 6, 2015 12:11
All the indian states and union territories in list. JS list for indian states. Programming way.
var allStates = "Andaman and Nicobar Islands,\
Andhra Pradesh,\
Arunachal Pradesh,\
Assam Dispur,\
Bihar,\
Chandigarh,\
Chhattisgarh,\
Dadra and Nagar Haveli,\
Daman and Diu,\
Delhi,\
@iraycd
iraycd / simple_https.py
Created April 9, 2015 20:00
Simple HTTPS
import BaseHTTPServer, SimpleHTTPServer
import ssl
httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='path/to/localhost.pem', server_side=True)
httpd.serve_forever()
@iraycd
iraycd / key-store-validation.java
Created April 9, 2015 22:13
Key Store Validation
try {
PackageInfo info = getPackageManager().getPackageInfo(
"com.facebook.samples.hellofacebook",
PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
} catch (NameNotFoundException e) {
@iraycd
iraycd / xib-merging.md
Last active August 29, 2015 14:22
Interface Builder (XIB) or Code when merging in a team environment

Was merging a consideration for going all code? Do you use XIBs just for layout and code the rest? Or, have you had any luck merging XIBs and over time you just get better at manually reading?

EDIT: My current approach is using it for strict layout (what it's really good at and painful to code) and setting all the options and data via code. I find code much easier to merge but laying out controls in code is tedious. Thoughts?

Was merging a consideration for going all code?

Yes, No, and "Portions Of". It depends on things like:

  • The people involved
  • the complexity of the UI
@iraycd
iraycd / Senior_android.md
Last active August 29, 2015 14:23
Position Senior Android Developer

Description

Ninjaas is a mobile internet company. We create mobile products which are mainly based on mCommerce, Communication, Media and Smart city infrastructure. We are the first internet company from india and all of our team are Ninjas. We expect in-depth understand and quick delivery will solve many problems in the world.

Responsibilities

  • Lead and mentor Android team
  • Have ownership over the Android app from user-interface to the networking stack
  • Ship reliable software through test automation and code reviews
  • Fix bugs and improve application performance
@iraycd
iraycd / Sr iOS Developer.md
Created June 27, 2015 12:41
Senior iOS Developer Position at Ninjaas.

Description

Ninjaas is a mobile internet company. We create mobile products which are mainly based on mCommerce, Communication, Media and Smart city infrastructure. We are the first internet company from india and all of our team are Ninjas. We expect in-depth understand and quick delivery will solve many problems in the world.

##Responsibilities

  • Ownership over the Ninjaas iOS app
  • Ship reliable software through test automation and code reviews
  • Fix bugs and improve application performance
  • Explore new ideas and technologies with engineering and design teams to continually iterate on the app
@iraycd
iraycd / example-user.js
Created May 6, 2012 06:35 — forked from nijikokun/example-user.js
Beautiful Validation..Javascript Username and Password Validation
var user = {
validateCredentials: function (username, password) {
return (
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' }
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' }
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' }
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' }
: (!/^([a-z0-9-_]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' }
: false
);
@iraycd
iraycd / .bash_profile
Created October 1, 2012 14:43
.bash_profile
export LANG="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_ALL=