Skip to content

Instantly share code, notes, and snippets.

View barbarbar338's full-sized avatar
☢️
works on my machine

Barış DEMİRCİ barbarbar338

☢️
works on my machine
View GitHub Profile
@barbarbar338
barbarbar338 / LaTeX-on-Android.md
Last active September 25, 2025 08:34
Compile LaTeX files on Android

Compile LaTeX files on Android

  • Install Termux from F-Droid. This part is important, not from Google Play Store. GPlay restricts some functionality of Termux.
  • Upgrade dependencies: pkg update && pkg upgrade
  • To access device storage, run this command. It's needed to access created LaTeX and PDF files: termux-setup-storage
  • cd into local storage: cd ~/storage/shared
  • Create LaTeX project folder. We'll save our files here and access them from this folder from our device: mkdir LaTeX
  • Install TeX Live installer: pkg install texlive-installer
  • Install TeX Live. Important note, do not change any option here: termux-install-tl
  • Fix missing binaries: texlinks
  • cd into home directory: cd ~
@barbarbar338
barbarbar338 / number-guessing-game.ps1
Created December 31, 2023 07:20
A simple number guessing game in PowerShell
enum Difficulty {
EASY
MEDIUM
HARD
}
Function GetMaxNumberByDifficulty {
[CMDLetBinding()]
Param(
[Difficulty]$Difficulty
@barbarbar338
barbarbar338 / server.ps1
Created December 31, 2023 07:13
A simple PowerShell HTTP server script that supports static file hosting, server-side executions and static routes.
$Port = 8080;
$StaticDir = "./public";
$Listener = New-Object System.Net.HttpListener;
$Listener.Prefixes.Add("http://localhost:$Port/");
$Listener.Start();
If ($Listener.IsListening) {
@barbarbar338
barbarbar338 / lanyard.tsx
Last active October 12, 2022 13:00
example of `react-use-lanyard` npm package with websockets
import type { FC } from "react";
import { useLanyard } from "react-use-lanyard";
export const Status: FC = () => {
const { loading, status } = useLanyard({
userId: "952574663916154960", // Put your Discord user ID here
socket: true,
});
const getStatus = () => {