Skip to content

Instantly share code, notes, and snippets.

View chankruze's full-sized avatar
🎯
Focusing

Chandan Kumar Mandal chankruze

🎯
Focusing
View GitHub Profile

Erase

sudo dd if=/dev/zero of=/dev/sdb bs=4k && sync

Create Partition Table

sudo fdisk /dev/sdb

Then press lettero to create a new empty DOS partition table.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="meme-os/android_device_realme_RMX1901" path="device/realme/RMX1901" remote="github" revision="havoc-pie" />
<project name="meme-os/android_device_realme_sdm710-common" path="device/realme/sdm710-common" remote="github" revision="havoc-pie" />
<project name="meme-os/proprietary_vendor_realme" path="vendor/realme" remote="github" revision="havoc-pie" />
<project name="N00bKernel/android_kernel_realme_sdm710" path="kernel/realme/sdm710" remote="github" revision="havoc-pie" />
</manifest>
sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
sudo adduser `id -un` libvirt
sudo adduser `id -un` kvm
sudo chown root:libvirt /dev/kvm
rmmod kvm
modprobe -a kvm

GUI manager

#include <stdio.h>
#include <math.h>
int main (){
int a, b, mod, gcd = 0;
printf("Enter Number A (Larger):\n");
scanf("%d", &a);
printf("Enter Number B (Smaller):\n");
scanf("%d", &b);
Animation shake = AnimationUtils.loadAnimation(this, R.anim.shake);
mButton01.startAnimation(shake);
package com.geekofia.cacheaway;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true">
<TextView
android:id="@+id/tvText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
@chankruze
chankruze / fragment_main.xml
Last active August 6, 2019 12:10
Blog: Shimmer Effect Android
<com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/shimmer_view_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
app:shimmer_auto_start="false"
app:shimmer_duration="2000">
<androidx.core.widget.NestedScrollView
package in.geekofia.baseconverter;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.inputmethod.InputConnection;
import android.widget.LinearLayout;
/*
* @Author: chankruze (Chandan Kumar Mandal)
* @Date: 2019-06-23 10:41:00
* @Last Modified by: chankruze (Chandan Kumar Mandal)
* @Last Modified time: 2019-06-23 10:59:47
*/
#include <stdio.h>
void showbits(int n)
{