Skip to content

Instantly share code, notes, and snippets.

View teocci's full-sized avatar
👨‍💻
Coding

Teocci teocci

👨‍💻
Coding
View GitHub Profile

Freezing and uninstalling non-removable Android apps in Developer mode

  1. Download and install Android SDK Platform-Tools on your computer. Of the tools inside, you’ll only need the Android Debug Bridge USB driver and the ADB command line.
  2. Enable Developer mode on your phone. The details vary slightly from vendor to vendor, but the general recipe is roughly the same: repeatedly tap the Build Number option in the About Phone.
  3. Enable USB Debugging under Developer Settings on your smartphone. There are multiple options there — but don’t touch any apart from these two!
  4. Connect your smartphone to your computer through USB.
  5. Allow Debug mode on your phone screen.
  6. Test Debug mode by getting a list of all packages (what developers call apps) installed on your phone. To do so, type the following in the ADB command line
adb shell pm list packages 
import java.util.ArrayList;
import java.util.List;
import java.util.stream.LongStream;
public class ObjectUpdateExample {
public static <T> void printArray(List<T> list) {
printArray(list.toArray());
}
(function (global) {
"use strict";
var Typed = function (element, options) {
this.el = document.querySelector(element);
this.options = Object.assign({}, Typed.DEFAULTS, options);
this.isInput = this.el.tagName.toLowerCase() === "input";
this.attr = this.options.attr;
this.showCursor = !this.isInput && this.options.showCursor;
this.elContent = this.attr ? this.el.getAttribute(this.attr) : this.el.textContent;
sudo rmmod e1000
sudo rmmod e1000e
sudo rmmod igb
sudo modprobe e1000
sudo modprobe e1000e
sudo modprobe igb
sudo dhclient ens37
#!/bin/sh
set -e
# Docker CE for Linux installation script
#
# See https://docs.docker.com/engine/install/ for the installation steps.
#
# This script is meant for quick & easy install via:
# $ curl -fsSL https://get.docker.com -o get-docker.sh
# $ sh get-docker.sh
#

Introduction

Docker is an application that simplifies the process of managing application processes in containers. Containers let you run your applications in resource-isolated processes. They’re similar to virtual machines, but containers are more portable, more resource-friendly, and more dependent on the host operating system.

For a detailed introduction to the different components of a Docker container, check out The Docker Ecosystem: An Introduction to Common Components.

Prerequisites

To follow this tutorial, you will need the following:

One Ubuntu 20.04 server set up by following the Ubuntu 20.04 initial server setup guide, including a sudo non-root user and a firewall.

@teocci
teocci / wait-groups.go
Created March 5, 2023 16:13
Playing with WaitGroup in nested goroutines
package main
import (
"crypto/rand"
"fmt"
"math/big"
"os"
"sync"
"time"
)

TODO List

  1. stats : {}

  2. orderDTOList -> history,

  3. chagne user stationList result format

    • 192.168.100.58:9090/api/v1/stations/kuser last 3
    • 192.168.100.58:9090/api/v1/station/4 all
  4. Add TODOS

    • ADMIN does not have stations
  • Remove registration of 3 default stations at the registration

Setup system.d service

sudo nano /lib/systemd/system/kogas-api.service

Add the service code below.

[Unit]
Description=Kogas JAVA API
@teocci
teocci / Dockerfile
Last active November 16, 2022 08:25
Basic configuration of docker for go and mariadb
# syntax=docker/dockerfile:1
FROM golang:alpine AS builder
RUN mkdir -p /go/src/app
WORKDIR /go/src/app
COPY . .
ENV CGO_ENABLED=0