Skip to content

Instantly share code, notes, and snippets.

View ahadcove's full-sized avatar

Ahad ahadcove

View GitHub Profile
@ahadcove
ahadcove / lumiastream-discord-webhook-examples.md
Created January 19, 2022 16:26
Lumia Stream Discord Webhook Examples

Basic Webhook JSON Example with username and message variables

{
  "username": "New Chat",
  "avatar_url": "https://i.imgur.com/siMz27i.png",
  "content": "{{username}} said: {{message}}"
}
@ahadcove
ahadcove / index.html
Last active June 2, 2021 18:42
Globalshortcut-Fix
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
@ahadcove
ahadcove / index.html
Last active June 2, 2021 18:33
Globalshortcut-Fiddle
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
@ahadcove
ahadcove / manual_crop.py
Created October 31, 2018 12:23 — forked from smeschke/manual_crop.py
Crop rectangle out of image using mouse clicks
import cv2, numpy as np
# Click on one corner of the image,
# then, click on the other corner on the image.
# The image will be cropped and saved into the folder (see below)
# Press 'esc' to quit
# Before you begin, change the path to you own video:
cap = cv2.VideoCapture('/home/stephen/Desktop/track.MP4')
@ahadcove
ahadcove / RGB2HSV.py
Last active August 22, 2019 20:58
RGB2HSV Script for OpenCV
#!/usr/bin/python
import cv2
import numpy as np
import sys
if len(sys.argv) < 4:
print("You need to enter 3 numbers")
sys.exit()
@ahadcove
ahadcove / VpnLoad.m
Last active October 28, 2017 15:43
NEVPNManager Setup
#define kKeychainServiceName @"me.app.vpn";
#define kKeychainPassword @"mykeypass";
#import "VpnLoad.h"
@import NetworkExtension;
@implementation VpnLoad
// This is how I save the pass to my keychain before hand. I don't think it works though or i'm setting it up wrong
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender