Skip to content

Instantly share code, notes, and snippets.

View Benargee's full-sized avatar

Benargee Benargee

  • Ontario, Canada
View GitHub Profile
@Benargee
Benargee / client.cpp
Created November 23, 2015 02:28 — forked from whoo24/client.cpp
Basic Winsock Program
#include "stdafx.h"
#include <WinSock2.h>
#include <ws2tcpip.h>
#pragma comment(lib, "Ws2_32.lib")
void run_client()
{
WSADATA wsaData;
WSAStartup( MAKEWORD(2,2), &wsaData );
@Benargee
Benargee / Flash R LED KEY.cpp
Last active December 6, 2015 05:38
Simple extension that should flash the R key when called after it initializes
#include "stdafx.h"
#include "Include\LogitechLEDLib.h" //http://gaming.logitech.com/developers "LED ILLUMINATION SDK"
#include <string>
#include <thread>
using namespace std;
bool SDK_initOK, SDK_verOK;
int majVer, minVer, BuildNum;
@Benargee
Benargee / fn_taskHint.sqf
Last active January 17, 2016 09:56
BIS_fnc_taskHint fix
/*
Author: Jiri Wainar
Revised by: Benargee
Description:
Display a task hint.
Parameters:
_this select 0: STRING - Task name
_this select 1: STRING - Task state (optional)
@Benargee
Benargee / cpuRamUsage.cs
Last active August 20, 2017 22:39
Arduino CPU and RAM usage monitor. Credit goes to this post: https://www.reddit.com/r/arduino/comments/6uwkv5/cpu_and_ram_usage_monitor/
//CPU&RAM counter by Sharpy
using System;
using System.Windows.Forms;
using System.IO.Ports;
using System.Diagnostics;
namespace WindowsFormsApplication14
{
public partial class Form1 : Form
@Benargee
Benargee / Breath.ino
Last active August 21, 2017 01:00
Controller for 24v LED lightbar driven by IRFZ44 MOSFET
/*
Breathing Led bar
By: Benargee
*/
int ledPin = 9; // LED connected to digital pin 9
int count = 2;
int inerval = 1; //interval in miliseconds between loops
int order = 1; //indicates order of decreasing or increasing intensity. 1: increasing -1:decreasing
const int minVal = 1;
@Benargee
Benargee / Py3-dummy-web-server.py
Last active October 29, 2017 03:57 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python 3. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost
@Benargee
Benargee / simple_websocket_client.html
Created October 30, 2017 00:47 — forked from geoffb/simple_websocket_client.html
Super simple websockets client/server using Python. Compatible with the draft 76 challenge/response.
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebSocket Client</title>
<style>
#output {
border: solid 1px #000;
}
</style>
</head>
@Benargee
Benargee / simple_websocket.html
Created October 30, 2017 00:54 — forked from SadatAnwar/simple_websocket.html
A working implementation of the super simple websocket python server
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebSocket Client</title>
<style>
#output {
border: solid 1px #000;
}
</style>
</head>
@Benargee
Benargee / rainbowLog.js
Last active January 1, 2022 17:24
A console.log with a little more... flair.
console.rainbow = function (str) {
const colors = [
"red",
"orange",
"yellow",
"green",
"blue",
"indigo",
"violet",//white in VS Code
@Benargee
Benargee / Example.md
Last active April 13, 2020 02:38
Draw lineIntersectsSurfaces point Arma 3

alt text