Skip to content

Instantly share code, notes, and snippets.

View iraycd's full-sized avatar
🎯
Focusing

Ray Ch iraycd

🎯
Focusing
View GitHub Profile
function decodePolyline(encoded) {
if (!encoded) {
return [];
}
var poly = [];
var index = 0, len = encoded.length;
var lat = 0, lng = 0;
while (index < len) {
var b, shift = 0, result = 0;
@iraycd
iraycd / horrible-storyboard.md
Created June 10, 2015 14:20
Bad Experiences with Storyboard.

Interestingly Apple doesn't even use Storyboards in their recently open-sourced ResearchKit as [Peter Steinberger has noticed][1] (under the subheading "Interface Builder").

As expected, Apple keeps improving Storyboards and Xcode. Some of the points that applied to iOS 7 and below don't apply to iOS 8 anymore (and are now marked as such). So while Storyboards inherently still have flaws, I revise my advice from don't use to selectively use where it makes sense.

Even now that iOS 7 is out, I would advise against to use caution when deciding whether to use Storyboards. Here are my reasons:

  • Storyboards fail at runtime, not at compile time: You have a typo in a segue name or connected it wrong in your storyboard? It will blow up at runtime. You use a custom UIViewController subclass that doesn't exist anymore in your storyboard? It will blow up at runtime. If you do such things in code, you will catch them early on, during compile time. Update: My new tool **[StoryboardLin
@iraycd
iraycd / xib-storyboard.md
Last active January 26, 2022 07:46
Storyboard Vs XIB

It is not to tell which one is the best. because which one is good to tell based on team requirement.

if your team have single developer its good for storyboard working less consumption time.either more number of developers use xib because it is not easily to merging the module/tasks

[xcode-using-storyboards-and-xibs-versus-creating-views-programmatically][1]

#Using XIBs

Advantages:

@iraycd
iraycd / jntu.js
Last active March 22, 2021 12:19
JNTU Shortcut Code.
var results;
elec = $("#forward").attr("onclick").split("'");
elec = elec[elec.length-2];
ht = $("#htno").val();
$("#forward").attr("onclick","gameon()");
gameon = function(){
console.log("Process Begins");
$.ajax({
@iraycd
iraycd / msg91.py
Last active December 23, 2020 23:45
MSG91 - Django SendSMS
from sendsms.backends.base import BaseSmsBackend
from django.conf import settings
import urllib
import urllib2
MSG91_AUTHKEY = getattr(settings, 'MSG91_AUTHKEY', '')
MSG91_ROUTE = getattr(settings, 'MSG91_ROUTE', '')
class Msg91SmsBackend(BaseSmsBackend):
@iraycd
iraycd / Readme.md
Created April 18, 2015 10:42
Python, Wheezy, uWSIG and HTTPS. SSL and TLS

In simple about SSL

  1. You should have a little knowledge about SSL/TLS.
    • In simple what it does is creates HTTPS, HTTPS helps you in securing the request and response.
    • It's a must have feature on any website. Something like when you are asking for username and password.
    • Why HTTPS?
      • HTTPS kicks man-in-the-middle in the butt, much more difficult to pull off.
      • Trust - People see HTTPS as diamonds.
      • SEO - Google fucking loves HTTPS.
  2. OpenSSL it's you create an SSL, you can later submit the certificate.
@iraycd
iraycd / nuclear.json
Created December 12, 2018 15:12
Spiff Workflow Real Example
{
"task_specs": {
"Start": {
"class": "SpiffWorkflow.specs.StartTask.StartTask",
"manual": false,
"outputs": [
"general"
]
},
"general": {
@iraycd
iraycd / pagination.md
Created November 28, 2018 05:49 — forked from mislav/pagination.md
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

@iraycd
iraycd / demo.html
Last active March 24, 2018 06:35
How angel.co custom jobs embed work
<script data-startup="jhink" src="https://angel.co/javascripts/embed_jobs.js" id="angellist_embed" async></script>
@iraycd
iraycd / .eslintrc
Last active January 16, 2017 11:14
ESLint React Native Sample
{
"parser": "babel-eslint",
"ecmaFeatures": {
"jsx": true
},
"env": {
"es6": true,
"jasmine": true,
},