Skip to content

Instantly share code, notes, and snippets.

View ashaffah's full-sized avatar
🎯
Focusing

Ashaffah ashaffah

🎯
Focusing
  • bedroom
  • 13:59 (UTC +07:00)
View GitHub Profile
@ashaffah
ashaffah / README.md
Created January 15, 2026 18:01 — forked from dunkelstern/README.md
Systemd Unit for running python application in virtualenv

Assumptions

  • Username is user
  • User is in group user
  • User's home is /home/user
  • Python application is in /home/user/pythonapp
  • Python script is named start.py
  • Virtual environment is /home/user/.virtualenvs/pythonapp created with python -m venv /home/user/.virtualenvs/pythonapp

You can add multiple Environment lines if you need more env-variables

<div style="position:absolute;top:-999px;left:-999px">
<svg
id="effectSvg"
width="200"
height="200"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg">
<filter id="displacementFilter4">
@ashaffah
ashaffah / broadcast-channel.md
Created June 6, 2025 16:41 — forked from davestewart/broadcast-channel.md
Example of using BroadcastChannel to communicate with pages in the same domain

screenshot

@ashaffah
ashaffah / BaseStation.java
Created May 28, 2025 21:45 — forked from eslamfaisal/BaseStation.java
An example to get cell towers info on Android
package com.mirrordust.gpscellinfodemo;
public class BaseStation {
private int mcc; // Mobile Country Code
private int mnc; // Mobile Network Code
private int lac; // Location Area Code or TAC(Tracking Area Code) for LTE