Skip to content

Instantly share code, notes, and snippets.

Avatar

Sushant J sushant-j

View GitHub Profile
View 0-startup-overview.md
@sushant-j
sushant-j / upload.java
Created Feb 26, 2020
Cloudinary Media Upload snippet - Java, Android
View upload.java
/**
* Uploads media to Cloudinary.
*/
private void uploadToCloudinary() {
try {
if (!NetworkUtils.isInternetAvailable(UploadService.this)) {
setPostState(PostEntity.ERROR_MEDIA);
notifyFailureAndNext();
return;
}
@sushant-j
sushant-j / mobile.video.encoding.md
Created Aug 28, 2019 — forked from pinge/mobile.video.encoding.md
Video and audio encoding for playback in Android and iOS devices
View mobile.video.encoding.md

Video and audio encoding for playback in Android and iOS devices

This document aims to provide an easy way encode video optimized for playback in mobile devices that use the Android or the iOS operating systems.

libx264 is used for (single or two-pass) video encoding and libfdk_aac for audio encoding.

ffmpeg, libx264 and libfdk_aac settings are optimized for playback quality and compatibility on Android and iOS. There is extensive documentation and references for each of the settings used and contributions are very welcome :)

View Testing Feedback v1.0.4 (53).md

Testing Feedback - v1.0.4 (53):

Adding a rating

  1. Resolution of uploaded media is based on device screen resolution, not standard 1920x1080
  2. Place name and details misaligned on story view (Screenshot)
  3. Even when tapping and holding on story view, the story view exits
    • Expected behaviour: Story view should remain paused, not exit
  4. All icons visible after tapping on "close" icon. Steps:
    1. Tap on close button after capturing media and selecting a place.
@sushant-j
sushant-j / README.md
Created Oct 24, 2018
Vega-lite trial
View README.md

Trying what'll happen now

@sushant-j
sushant-j / copy_resources.sh
Last active Nov 29, 2017
Copies resources from drawable-xxx/ folder to proper folders in {N} project > App_Resources.
View copy_resources.sh
# Android
cp -u drawable-hdpi/* ~/sminq-global/global-product-hybrid-app/app/App_Resources/Android/drawable-hdpi/
cp -u drawable-mdpi/* ~/sminq-global/global-product-hybrid-app/app/App_Resources/Android/drawable-mdpi/
cp -u drawable-xhdpi/* ~/sminq-global/global-product-hybrid-app/app/App_Resources/Android/drawable-xhdpi/
cp -u drawable-xxhdpi/* ~/sminq-global/global-product-hybrid-app/app/App_Resources/Android/drawable-xxhdpi/
cp -u drawable-xxxhdpi/* ~/sminq-global/global-product-hybrid-app/app/App_Resources/Android/drawable-xxxhdpi/
# iOS
cp -u *.png ~/sminq-global/global-product-hybrid-app/app/App_Resources/iOS/images/
View {N} CSS.md
CSS Property JavaScript Property Description
color color Sets a solid-color value to the matched view’s foreground.
background-color backgroundColor Sets a solid-color value to the matched view’s background.
placeholder-color placeholderColor Sets the placeholder (hint) font color to matched views.
background-image backgroundImage Sets a image url to the matched view’s background image.
background-repeat backgroundRepeat Sets if/how the background image should be repeated. Possible values: repeat, repeat-x, repeat-y, no-repeat
background-position backgroundPosition Sets the starting position of the background image. You can set the position with absolute, percent or alignment values. More info here.
background-size backgroundSize Sets the size of the background image. Possible values: "length length", "percent% percent%", "cover" or "contain".
border-color borderColor Sets border colors to the matched view’s.
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
View tns_doctor_log_trace_2
Loading extensions.
Exec uname -a
stdout: Linux sushant-Inspiron-3543 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
stderr:
Exec npm -v
stdout: 3.10.10
stderr:
spawn: java "-version"
@sushant-j
sushant-j / tns_doctor_log_trace
Created Nov 3, 2017
Log trace after running tns doctor.
View tns_doctor_log_trace
Loading extensions.
Exec uname -a
stdout: Linux sushant-Inspiron-3543 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
stderr:
Exec npm -v
stdout: 4.6.1
stderr:
spawn: java "-version"
You can’t perform that action at this time.