This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
s=$(date +%s | cut -b1-13) | |
while true | |
do | |
export DISPLAY=:0.0 | |
battery_percent=$(acpi -b | grep -P -o '[0-9]+(?=%)') | |
if on_ac_power; then | |
if [ "$battery_percent" -gt 90 ]; then | |
s=$(date +%s | cut -b1-13) | |
notify-send -i notification-power-disconnected -t 6000 "Battery full." "Level: ${battery_percent}% " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Common Internet File System utilities | |
# Wed Aug 8 12:34:05 IST 2018 | |
sudo apt-get install cifs-utils | |
# Modern music player and library organiser inspired by Amarok 1.4 | |
# Tue May 22 13:21:25 IST 2018 | |
sudo apt-get install clementine | |
# cross-platform, open-source make system | |
# Sun Feb 18 17:55:21 IST 2018 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install -y cmake gimp git git-core htop intel-microcode libatlas-base-dev libblas-dev libmysqlclient-dev liblapack-dev libopenblas-base linux-image-extra-virtual mysql-server openssh-server vlc python-dev software-properties-common software-properties-gtk | |
# tor-browser | |
sudo apt install -y torbrowser-launcher | |
# skype | |
sudo dpkg -i skypeforlinux-64.deb | |
# sublime | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.yogenp.globalcodetest | |
import android.content.ComponentName | |
import android.content.Intent | |
import android.os.Bundle | |
import androidx.core.util.Preconditions | |
import androidx.fragment.app.Fragment | |
import androidx.fragment.app.FragmentFactory | |
import androidx.fragment.app.testing.FragmentScenario | |
import androidx.test.core.app.ActivityScenario |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun loadJSONFromAsset(context: Context, name: String): String { | |
var json = "" | |
try { | |
val inputStream = context.applicationContext.assets.open(name) | |
val size = inputStream.available() | |
val buffer = ByteArray(size) | |
inputStream.read(buffer) | |
inputStream.close() | |
json = String(buffer, Charsets.UTF_8) | |
} catch (ioException: IOException) { |