Skip to content

Instantly share code, notes, and snippets.

View maksudc's full-sized avatar

Md. Maksud Alam Chowdhury maksudc

  • Dhaka , Bangladesh
View GitHub Profile
@maksudc
maksudc / P12toPEM.txt
Last active March 7, 2019 08:32 — forked from shahdhiren/P12toPEM.txt
Convert P12 file for Push Notification to PEM format
Development Phase:
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -nodes -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -nodes -out apns-dev-key.pem -in apns-dev-key.p12
Step 3: Optional (If you want to remove pass phrase asked in second step)
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
@maksudc
maksudc / Depth.java
Last active June 29, 2018 07:02
Clean Code Presentation-Objects
// Bad
final String outputDir = ctxt.getOptions().getScratchDir().getAbsolutePath();
// Better
Options opts = ctxt.getOptions();
File scratchDir = opts.getScratchDir();
final String outputDir = scratchDir.getAbsolutePath();
// Best
BufferedOutputStream bos = ctxt.createScratchFileStream(classFileName);
api_process-16 (err): at Promise._settlePromises (/home/dakharkara/courierwebapp/node_modules/bluebird/js/release/promise.js:684:18)
api_process-16 (err): Money order created corresponding to vd
api_process-16 (err): { status: 'error',
api_process-16 (err): message: 'No money parcel found against this vd!' }
api_process-16 (err): { status: 'error',
api_process-16 (err): message: 'No money parcel found against this vd!' }
api_process-16 (err): Money order created corresponding to vd
api_process-16 (err): Money order created corresponding to vd
api_process-16 (err): Money order created corresponding to vd
api_process-16 (err): { status: 'error',
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
{"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo"}
{ status: 'error',
mesage: '{"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo"} undefined' }
api_process-82 (out): Found exit branch
api_process-82 (out): Found entry branch
api_process-82 (out): Found exit branch
api_process-82 (out): Found entry branch
api_process-82 (out): Found exit branch
api_process-82 (out): Found entry branch
api_process-82 (out): Found exit branch
api_process-82 (out): Found entry branch
api_process-82 (out): Found exit branch
api_process-82 (out): Found entry branch
<?xml version="1.0" encoding="UTF-8" ?>
<changed>false</changed>
<cmd>/usr/local/bin/virtualenv --no-site-packages env</cmd>
<failed>true</failed>
<msg>
stdout: New python executable in /home/amsaslink/AmsaslinkImageManagerServer/env/bin/python
:stderr: Traceback (most recent call last):
File &quot;/usr/local/bin/virtualenv&quot;, line 11, in &lt;module&gt;
sys.exit(main())
<?xml version="1.0" encoding="UTF-8" ?>
<changed>false</changed>
<cmd>/usr/local/bin/virtualenv --no-site-packages env</cmd>
<failed>true</failed>
<msg>
stdout: New python executable in /home/amsaslink/AmsaslinkImageManagerServer/env/bin/python
:stderr: Traceback (most recent call last):
File &quot;/usr/local/bin/virtualenv&quot;, line 11, in &lt;module&gt;
sys.exit(main())
- name: Install the requirements txt file
pip:
chdir={{ DIRECTORY }}
virtualenv=env
virtualenv_site_packages=no
requirements=requirements.txt
state=present
package com.lantas.postmortem.db;
import android.content.ContentValues;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.text.TextUtils;