Skip to content

Instantly share code, notes, and snippets.

View sudhanshu-15's full-sized avatar

Sudhanshu Siddh sudhanshu-15

View GitHub Profile
@sudhanshu-15
sudhanshu-15 / Jenkinsfile
Created November 14, 2018 15:59
Jenkins file for Flutter tests
pipeline {
agent any
stages {
stage ('Checkout') {
steps {
checkout scm
}
}
stage ('Download lcov converter') {
steps {
@sudhanshu-15
sudhanshu-15 / Dockerfile
Created November 13, 2018 18:10
Docker image with Jenkins and Flutter installed
# Setting the base image of which docker image is being created
FROM jenkins/jenkins:lts
LABEL maintainer="sudhanshu.15@gmail.com"
LABEL description="A docker image made from jenkins lts and flutter installed"
# Switching to root user to install dependencies and flutter
USER root
# Installing the different dependencies required for Flutter, installing flutter from beta channel from github and giving permissions to jenkins user to the folder
@sudhanshu-15
sudhanshu-15 / AnswerActivity.java
Last active May 24, 2018 18:47
Summer REU Android Snippets
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import java.util.Random;
public class AnswerActivity extends AppCompatActivity {
@sudhanshu-15
sudhanshu-15 / Permissions.java
Created April 26, 2018 06:15
Sample code to handle permissions in Android
//Request App Permissions
private void permissionsRequest(){
if(ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)
!= PackageManager.PERMISSION_GRANTED
|| ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION}, 111);
}else{
startARActivity();
@sudhanshu-15
sudhanshu-15 / index.js
Last active April 20, 2018 08:47
Example gist for vue-embed-gist
import VueGist from './components/VueGist.vue'
export default {
name: 'vue-embed-gist',
props: ['gistId'],
render(h) {
return h(VueGist, {
props: {
gistId: this.gistId
}
})
@sudhanshu-15
sudhanshu-15 / iOSLaunchImage.md
Last active July 14, 2017 18:51
iOS Launch Image Size and Name Mapped

iOS Launch Screen Image sizes and name

Working on iOS app development could be frustrating at times and I found that the documentation provided by Apple to tackle launch image size wasn't clear enough to implement the Launch Image. After looking through several resources online and reading through several stackoverflow answers, I still wasn't able to completely implement the Launch Image.

Finally after multiple unsuccessful attempts I was able to get it right and this is a summary of different XCode options mapped with the image resolutions:

(Note: The naming convention is something which I followed for my app)

  • iPhone Portrait iOS 5, 6

    • 1x -> 320 × 480 px -> splashscrn_ios
@sudhanshu-15
sudhanshu-15 / gist:d3983ddc48560fac2307db09412194da
Last active August 14, 2017 14:27
Commands that I keep forgetting -- Work in progress
svn checkout https://github.com/NickIliev/NativeScript-Issues-2017/trunk/NativeScript/issue_4366
git push -u origin sun4/SUN4-1-mobile-MainPageUI-Mockups-SideDrawerExperiments
git merge --no-ff sun4/SUN4-1-mobile-background-image-configs
git merge --no-commit --no-ff sun4/SUN4-1-mobile-image-assets-rename