Skip to content

Instantly share code, notes, and snippets.

View mdakram's full-sized avatar
🎯
Focusing

Mohammad Akram mdakram

🎯
Focusing
View GitHub Profile
@mdakram
mdakram / delete-likes-from-twitter.md
Created March 5, 2023 13:34 — forked from aymericbeaumet/delete-likes-from-twitter.md
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@mdakram
mdakram / import-x509-pk8-to-jks-keystore.md
Created December 14, 2022 09:15 — forked from berkedel/import-x509-pk8-to-jks-keystore.md
How to import x509.pem pk8 file into jks keystore

How to import x509.pem pk8 file into jks keystore

Prerequiste:

Generate a file platform.priv.pem from you pk8 file.

openssl pkcs8 -in platform.pk8 -inform DER -outform PEM -out platform.priv.pem -nocrypt
@mdakram
mdakram / maven_publish.gradle
Created December 24, 2021 10:43 — forked from viktoriia-io/maven_publish.gradle
Maven publishing script for customising pom file generation
apply plugin: 'maven-publish'
afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
groupId project.ext.pomGroupID
artifactId project.name
version project.ext.pomVersion
@mdakram
mdakram / Interceptor.java
Created September 5, 2018 07:38 — forked from alex-shpak/Interceptor.java
Refreshing OAuth token with okhttp interceptors. All requests will wait until token refresh finished, and then will continue with the new token.
private class HttpInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
//Build new request
Request.Builder builder = request.newBuilder();
builder.header("Accept", "application/json"); //if necessary, say to consume JSON
@mdakram
mdakram / EachDirectoryPath.md
Created September 29, 2015 13:20 — forked from granoeste/EachDirectoryPath.md
[Android] How to get the each directory path.

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories

@mdakram
mdakram / Makeup
Last active August 29, 2015 14:10 — forked from Trikke/Makeup
package trikke.gists;
import android.graphics.Typeface;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.BackgroundColorSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.RelativeSizeSpan;
import android.text.style.StrikethroughSpan;
import android.text.style.StyleSpan;
package com.example.maptest;
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;
import org.osmdroid.DefaultResourceProxyImpl;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.ItemizedIconOverlay;
@mdakram
mdakram / google.xml
Created September 1, 2014 06:24 — forked from cmtsij/google.xml
<!--
custom "Google Map" source for Mobile Atlas Creator 1.9.8
save in *.xml and move to /mapsources
-->
<customMapSource>
<name>Google Map</name>
<minZoom>0</minZoom>
<maxZoom>20</maxZoom>
<tileType>PNG</tileType>
package com.cyrilmottier.android.citybikes.provider;
import android.net.Uri;
import com.cyrilmottier.android.avelov.BuildConfig;
/**
* @author Cyril Mottier
*/
public class CityBikesContract {
/*
* Copyright (C) 2014 Chris Banes
*
* 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