Skip to content

Instantly share code, notes, and snippets.

View pranaypatel512's full-sized avatar
😎
Working...

pRaNaY pranaypatel512

😎
Working...
View GitHub Profile
@meetjanani-simformsolutions
meetjanani-simformsolutions / AppModule.kt
Created June 4, 2020 09:09
AWS Upload Image on S3 Using Cognito Pool ID
single {
ClientConfiguration().apply {
maxErrorRetry = 3
connectionTimeout = 5 * 1000
socketTimeout = 5 * 1000
protocol = Protocol.HTTP
}
}
single {
@ankitsinghaniyaz
ankitsinghaniyaz / webdev.yaml
Created May 21, 2020 19:13
Ansible file to setup a web develoipment environment in an Ubuntu(ish) OS
# Set up a development environment on an Ubuntu flavored linux distribution
# install and sets up:
# rbenv, nvm, mysql, postgres, redis
# vscode, slack, docker, chormium, tilix, heroku, postman, beekeeper, skype, kazam, peek and more
# setup an rsa key
# Usage:
# install ansible 2.7+ - latest
## sudo apt-add-repository ppa:ansible/ansible && sudo apt update && sudo apt install ansible
# run the playbook:
## ansible-playbook webdev.yaml -K -e "email=<your@email.com>"
@wajahatkarim3
wajahatkarim3 / ActivitiesLaunchingWay.kt
Last active April 3, 2023 08:12
Kotlin Extensions for simpler, easier and funw way of launching of Activities
/**
* Kotlin Extensions for simpler, easier and funw way
* of launching of Activities
*/
inline fun <reified T : Any> Activity.launchActivity (
requestCode: Int = -1,
options: Bundle? = null,
noinline init: Intent.() -> Unit = {})
{
@pranaypatel512
pranaypatel512 / gradle_ext_versions
Last active November 3, 2018 11:50
Gradle dependencies version
ext {
compileSdkVersion = 28
targetSdkVersion = 28
minSdkVersion = 19
supportLibVer = '28.0.0'
constraintLayoutVer = '1.1.2'
jUnitVer = '4.12'
testRunnerVer = '1.0.2'
espressoCoreVer = '3.0.2'
firebaseVer = '16.0.4'
@nieldeokar
nieldeokar / AudioRecordThread.java
Last active April 23, 2023 02:25
Recording an Audio with .aac extension using AudioRecord android.
package com.nieldeokar.whatsappaudiorecorder.recorder;
import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
import android.media.MediaRecorder;
import android.os.Build;
import android.util.Log;
@iotakodali
iotakodali / Apeligibility.java
Created April 29, 2018 07:13
Java Bean for app of Andhra Pradesh Citizen Survey
package com.codetree.nandyala.model;
import com.google.gson.annotations.SerializedName;
public class Apeligibility {
@SerializedName("ADDRESS")
private String address;
@SerializedName("AE_MOB_NUM")
private String aeMobNum;
@SerializedName("AE_UID")
@florina-muntenescu
florina-muntenescu / BaseDao.kt
Last active September 28, 2023 15:01
Use Dao inheritance to reduce the amount of boilerplate code - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
import java.util.Calendar;
public class DateTimeUtils {
private static final long SEC = 1000;
private static final long MIN = SEC * 60;
private static final long HOUR = MIN * 60;
private static final long DAY = HOUR * 24;
private static final long WEEK = DAY * 7;
private static final long YESTERDAY = DAY * 2;

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@passsy
passsy / KIntent.kt
Last active March 28, 2023 06:51
Kotlin extension functions to start a generic Activity
package com.pascalwelsch.extensions
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
/**
* Extensions for simpler launching of Activities