Skip to content

Instantly share code, notes, and snippets.

View akamahesh's full-sized avatar

Mahesh Bhatt akamahesh

View GitHub Profile
@akamahesh
akamahesh / java8_ubuntu_installation.md
Created March 22, 2018 12:01
How to install java 8 on ubuntu

To install java 8

sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer

>to set it default

Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
Creating a MEAN app with Docker -
https://scotch.io/tutorials/create-a-mean-app-with-angular-2-and-docker-compose
https://www.buymeacoffee.com/akamahesh
angular material
https://codingthesmartway.com/angular-material-introduction/
I found this really neat way of updating node on David Walsh's blog, you can do it by installing n:
> for update node
@akamahesh
akamahesh / docker-ce-ubuntu-17.10.md
Last active March 3, 2018 17:06 — forked from levsthings/docker-ce-ubuntu-17.10.md
Install Docker CE on Ubuntu 16LTS

Installing Docker CE on Ubuntu 17.10 Artful Aardvark

As of 20/10/2017, a release file for Ubuntu 17.10 Artful Aardvark is not available on Download Docker.

If you are used to installing Docker to your development machine with get-docker script, that won't work either. So the solution is to install Docker CE from the zesty package.

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@akamahesh
akamahesh / FullscreenFragment.java
Created March 6, 2017 06:43 — forked from gelldur/FullscreenFragment.java
FullscreenFragment - simple android fragment that will make fullscreen for you. Remember to: "You must manually call onKeyDown and onWindowFocusChanged."
package com.dexode.fragment;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.view.KeyEvent;
@akamahesh
akamahesh / ZoomOutPageTransformer.java
Created December 14, 2016 08:28
ZoomOutPageTransformer.java
package com.innverse.epazer.UI.Controllers;
import android.support.v4.view.ViewPager;
import android.view.View;
public class ZoomOutPageTransformer implements ViewPager.PageTransformer {
private static final float MIN_SCALE = 0.85f;
private static final float MIN_ALPHA = 0.5f;
public void transformPage(View view, float position) {
@akamahesh
akamahesh / RoundedTransformation.java
Created December 14, 2016 08:27
RoundedTransformation.java for picasso
package com.innverse.epazer.UI.Controllers;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
public class RoundedTransformation implements com.squareup.picasso.Transformation {
@akamahesh
akamahesh / CircularTransformation.java
Created December 14, 2016 08:24
CircularTransformation.java
package com.innverse.epazer.UI.Controllers;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import com.squareup.picasso.Transformation;
public class CircularTransformation implements Transformation {
package com.innverse.epazer.UI.Controllers;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import com.squareup.picasso.Transformation;
public class CircularTransformation implements Transformation {
@akamahesh
akamahesh / DeviceDisplayMetrics.java
Created December 12, 2016 10:27
DeviceDisplayMetrics.java
package com.innverse.epazer.UI.Controllers;
import android.app.Activity;
import android.content.Context;
import android.util.DisplayMetrics;
/**
* Created by root on 28/11/16.
*/