Skip to content

Instantly share code, notes, and snippets.

View Vikctar's full-sized avatar
💭
Learning

Vikctar

💭
Learning
  • Nairobi Kenya
View GitHub Profile
@Vikctar
Vikctar / SignUpActivity.java
Created November 11, 2016 06:36
Showing sign up logic
package com.pathways.redwood.activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
@Vikctar
Vikctar / EditProfileActivity.java
Created July 1, 2017 20:23
convert bitmap to string
public String getStringImage(Bitmap bmp) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
byte[] imageBytes = byteArrayOutputStream.toByteArray();
return "data:image/jpeg;base64," + Base64.encodeToString(imageBytes, Base64.DEFAULT);
}
@Vikctar
Vikctar / UploadImage.java
Created August 19, 2017 19:10
upload image
/**
* Convert image bitmap to base64 string
* @param bmp bitmap
* @return base64 string
*/
public String getStringImage(Bitmap bmp) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
byte[] imageBytes = byteArrayOutputStream.toByteArray();
return "data:image/jpeg;base64," + Base64.encodeToString(imageBytes, Base64.DEFAULT);
@Vikctar
Vikctar / install_netextender_ubuntu_64_bit
Created March 19, 2019 07:40 — forked from egobude/install_netextender_ubuntu_64_bit
Install NetExtender | Ubuntu 64 Bit
1. go to https://sslvpn.demo.sonicwall.com/cgi-bin/welcome
2. log in with demo/password
3. click on NetExtender icon, this will download a tar.gz with the client
4. sudo ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/libssl.so.6
5. sudo ln -s /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.6
6. un-tar the client, make install script executable and launch install