Skip to content

Instantly share code, notes, and snippets.

View Asifnewaz's full-sized avatar
🍖

Asif Newaz Asifnewaz

🍖
View GitHub Profile

iOS Code Review Checklist

  • Avoid Type Inference
  • Prefer using Higher Order Functions
  • Write DRY code (Don’t Repeat Yourself)
  • Make sure that there are no force unwraps
  • Make sure that there are no retain cycles
  • Check if any deprecated API is being used
  • Check if any hardcoded checks (generally strings) can be changed to enum.
  • Prefer enum, switch over if else.
@Asifnewaz
Asifnewaz / EncryptSample.java
Created December 18, 2020 18:35 — forked from ozkansari/EncryptSample.java
PIN Block Creation
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class EncryptSample {
private static final String KEY = "AB1C11111111111AAAAAAADDDDD11111";
private static final int PIN_LENGTH = 6;
public static void main(String[] args) throws Exception {
@Asifnewaz
Asifnewaz / PinblockTool.java
Created December 18, 2020 18:35 — forked from Gilmor/PinblockTool.java
Pinblock ISO 9564 format 0
package cz.monetplus.mnsp.tools.misc;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang.StringUtils;
/**
* Tools for encoding a decoding pinblock
*
* @author Tomas Jacko <tomas.jacko [at] monetplus.cz>
@Asifnewaz
Asifnewaz / RectangularDashedView.swift
Created January 2, 2020 07:07
Dashed line border around a UIView
import UIKit
class RectangularDashedView: UIView {
@IBInspectable var cornerRadius: CGFloat = 0 {
didSet {
layer.cornerRadius = cornerRadius
layer.masksToBounds = cornerRadius > 0
}
}
@Asifnewaz
Asifnewaz / Place Picker Manifest.xml
Last active November 28, 2017 06:37
The place picker is a simple and yet flexible built-in UI widget, part of the Google Places API for Android. For using This CODE some need to be careful about ACTIVITY NAME and Related XML NAME and READ the COMMENT given in the file.
<!-- Manifest file need to include permission and Google API Key -->
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.securepenny.placepickerbasic">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
#header{ background-color : light green ;
color : orange;
width: 92%;
height: 50px;}
body{
background-image:url('pic4.jpg');}
#content{
width: 90%;
margin-left: auto;
margin-right: auto;