Skip to content

Instantly share code, notes, and snippets.

View runo280's full-sized avatar
🀨

runo280 runo280

🀨
  • ‍‍‍~
View GitHub Profile
@pksunkara
pksunkara / config
Last active May 31, 2025 15:37
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
github = pksunkara
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[column]
ui = auto
@koral--
koral-- / SinglePagerTitleStrip.java
Last active April 10, 2017 10:43
Modification of android.support.v4.view.PagerTitleStrip preserving only primary page indicator, see http://www.thedroidsonroids.com/blog/android/pagertitlestrip-with-current-page-indicator-only/ for more info.
/*
* Copyright (C) 2011 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
@granoeste
granoeste / EachDirectoryPath.md
Last active April 27, 2025 06:18
[Android] How to get the each directory path.

System directories

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

External storage directories

@aprock
aprock / RoundedTransformation.java
Created August 12, 2013 18:08
Rounded Corner Image Transformation for square's Picasso
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
// enables hardware accelerated rounded corners
// original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active May 19, 2025 10:27
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
mkdir -p ~/.ssh
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
@slightfoot
slightfoot / NightModeHelper.java
Last active September 24, 2024 01:44
Night Mode Helper - Helps use utilise the night and notnight resource qualifiers without being in car or dock mode.
import java.lang.ref.WeakReference;
import android.app.Activity;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.preference.PreferenceManager;
/**
* Night Mode Helper
@staltz
staltz / introrx.md
Last active June 6, 2025 21:39
The introduction to Reactive Programming you've been missing
@passsy
passsy / ArrayAdapter.java
Last active February 28, 2025 10:00
ArrayAdapter for RecyclerView
package com.pascalwelsch.utils;
import android.support.annotation.Nullable;
import android.support.v7.util.DiffUtil;
import android.support.v7.widget.RecyclerView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@rallat
rallat / build.gradle
Last active November 16, 2015 06:39
release signed apk using gradle
android {
signingConfigs {
release {
storeFile file("/path/to/keystore")
storePassword "storepassword"
keyAlias "alias"
keyPassword "keypassword"
}
}
buildTypes {
@arashm
arashm / radiojavan.rb
Last active April 22, 2022 20:03
Fetch download links of RadioJavan Playlists
#!/usr/bin/env ruby
# gem install mechanize
require 'mechanize'
abort "Usage:\n\tradiojavan.rb \"https://www.radiojavan.com/playlists/playlist/mp3/02596ef9986a\" output_txt" if ARGV.size < 2
playlist_url = ARGV[0]
output_file = ARGV[1]
HOST = 'https://www.radiojavan.com'