Skip to content

Instantly share code, notes, and snippets.

🇮🇳
Exploring ideas

Karthik Sirasanagandla karthiks

🇮🇳
Exploring ideas
Block or report user

Report or block karthiks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@karthiks
karthiks / install_minikube_ubuntu1810.sh
Last active Jan 28, 2019
Steps to install minikube on ubuntu 18.10
View install_minikube_ubuntu1810.sh
# Note of thanks: This code snippet is created using https://carbon.now.sh. Check it out!
# Update the system
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get upgrade
# Install KVM or VirtualBox or both
# I prefer KVM
# Installing virtualbox
@karthiks
karthiks / install_vbox60_ubuntu1810.sh
Created Jan 28, 2019
How to Install VirtualBox 6.0 on Ubuntu 18.10
View install_vbox60_ubuntu1810.sh
# Open the terminal and run the following commands:
# Add VirtualBox 6 repo keys
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
# Enable VirtualBox 6.0 repository
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
sudo apt-get update
@karthiks
karthiks / enhanced-form.js
Last active Apr 2, 2018
Submit form at the click of an Enter/Return button
View enhanced-form.js
class EditTaskModal extends Component {
.
.
.
render() {
return (
<form onSubmit={(e)=>this.modifyTask(e)}>
<input className="ToDoInput" value={this.state.task} onChange={this.handleEditingTask} />
<button type="submit" className="ToDoSubmit"> Edit </button>
</form>
@karthiks
karthiks / simple-form.js
Last active Apr 2, 2018
Edit row item in a table at button click in a modal dialog using ReactJS
View simple-form.js
class EditModal extends Component {
.
.
.
render() {
return (
<input className="ToDoInput" value={this.state.task} onChange={this.handleEditingTask} />
<button onClick={(e)=>this.modifyTask(e)} className="ToDoSubmit"> Edit </button>
);
}
View MainActivity.java
private NotificationUtils notificationUtils;
//..
public void someMethod() {
notificationUtils = new NotificationUtils(this);
notificationUtils.getNotificationManager().notify(random_id, getAndroidChannelNotification(title, body));
}
//..
@karthiks
karthiks / NotificationUtils.java
Created Aug 24, 2017
Create Notification object using Builder
View NotificationUtils.java
public class NotificationUtils extends ContextWrapper {
public static final String ANDROID_CHANNEL_ID = "com.androidstuff.tutsplustalerts.ANDROID";
public static final String IOS_CHANNEL_ID = "com.androidstuff.tutsplustalerts.IOS";
public static final String ANDROID_CHANNEL_NAME = "ANDROID CHANNEL";
public static final String IOS_CHANNEL_NAME = "IOS CHANNEL";
private NotificationManager notificationManager;
public NotificationUtils(Context base) {
super(base);
@karthiks
karthiks / NotificationUtils.java
Last active Aug 22, 2018
Create NotificationChannel object per Channel, with the desired options
View NotificationUtils.java
public class NotificationUtils extends ContextWrapper {
public static final String ANDROID_CHANNEL_ID = "com.androidstuff.tutsplustalerts.ANDROID";
public static final String IOS_CHANNEL_ID = "com.androidstuff.tutsplustalerts.IOS";
public static final String ANDROID_CHANNEL_NAME = "ANDROID CHANNEL";
public static final String IOS_CHANNEL_NAME = "IOS CHANNEL";
private NotificationManager notificationManager;
//..
public NotificationUtils(Context base) {
@karthiks
karthiks / NotificationUtil.java
Last active Aug 24, 2017
Create NotificationManager from SystemService
View NotificationUtil.java
public class NotificationUtils extends ContextWrapper {
private NotificationManager notificationManager;
public NotificationManager getNotificationManager() {
if (notificationManager == null) {
notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
}
return notificationManager;
}
}
@karthiks
karthiks / README.md
Created May 19, 2017 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@karthiks
karthiks / MyApp.java
Created Jan 17, 2017
CleverTap-Validator-Issue-1
View MyApp.java
public class MyApp extends Application {
@Override
public void onCreate() {
ActivityLifecycleCallback.register(this); //Must be called before super.onCreate()
super.onCreate();
if (BuildConfig.DEBUG) {
// During development, we set the SDK to debug mode,
// in order to log warnings or other important messages to Android logging system.
CleverTapAPI.setDebugLevel(1); // optional
}
You can’t perform that action at this time.