Skip to content

Instantly share code, notes, and snippets.

View abewartech's full-sized avatar
🏠
Working from home

Rahmad Al Habib abewartech

🏠
Working from home
View GitHub Profile
@jorcelinojunior
jorcelinojunior / cursor_appimage_manager.sh
Last active April 17, 2025 05:02
Automate the integration of Cursor .AppImage on Linux: updates .desktop, manages icons, ensures the latest version, and configures AppArmor (Required for Ubuntu 24.04).
#!/bin/bash
set -euo pipefail
# Definition of colors for terminal output
readonly RED_COLOR="\e[31m"
readonly GREEN_COLOR="\e[32m"
readonly YELLOW_COLOR="\e[33m"
readonly BLUE_COLOR="\e[34m"
readonly MAGENTA_COLOR="\e[35m"
@janasco
janasco / AnyDesk-Reset.cmd
Created August 3, 2023 09:46
AnyDesk Reset
@echo off & setlocal enableextensions
title Reset AnyDesk
reg query HKEY_USERS\S-1-5-19 >NUL || (echo Please Run as administrator.& pause >NUL&exit)
chcp 437
call :stop_any
del /f "%ALLUSERSPROFILE%\AnyDesk\service.conf"
del /f "%APPDATA%\AnyDesk\service.conf"
copy /y "%APPDATA%\AnyDesk\user.conf" "%temp%\"
rd /s /q "%temp%\thumbnails" 2>NUL
xcopy /c /e /h /r /y /i /k "%APPDATA%\AnyDesk\thumbnails" "%temp%\thumbnails"
@bdwilson
bdwilson / snapshot.php
Created August 11, 2019 18:58
Hikvision Camera Snapshot Auth Proxy
<?php
# Hikvision Snapshot Proxy - authenticates session via GET request to retrieve
# a snapshot from an internal camera (not open to the Internet)
#
# https://yourserver/snapshot.php?auth=abcd1234&snapshot=2
# https://yourserver/snapshot.php?auth=abcd1234&snapshot=1
#
$password = "abcd1234";
$user = "user"; # of your camera
$pass = "password"; # of your camera
@unitycoder
unitycoder / 0-win10-live-stream-server.txt
Last active April 16, 2022 11:26
Setting up Live Video Stream Server on Windows 10 (RTPM + HLS + OBS)
from http://zqdevres.qiniucdn.com/data/20170907091103/index.html
- download ngingx with RTPM module http://nginx-win.ecsds.eu/download/ *nginx 1.7.12.1 Lizard.zip
- unzip
- create start.bat script
@echo off
title Start Stream
cd /d "C:\nginx"
start nginx
exit
@troyfontaine
troyfontaine / readme.md
Last active April 18, 2025 13:58
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This process requires that you are able to ssh OR log in locally using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customization-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and swap.

NOTE: If you want to be sure that nothing is writing to /home you can either modify the host to boot into single-user mode OR try to use the systemctl isolate runlevel1.target command to switch (not tested! should work).

@ramiroaznar
ramiroaznar / AnimatedMarker.js
Last active September 26, 2024 02:03
How to make your markers move with Leaflet.js
L.AnimatedMarker = L.Marker.extend({
options: {
// meters
distance: 200,
// ms
interval: 1000,
// animate on add?
autoStart: true,
// callback onend
onEnd: function(){},