Skip to content

Instantly share code, notes, and snippets.

View mp5gosu's full-sized avatar
🤓
Blender as usual...

Robert mp5gosu

🤓
Blender as usual...
View GitHub Profile
#region Ensure the WinRm service is running
Set-Service -Name "WinRM" -StartupType Automatic
Start-Service -Name "WinRM"
#endregion
#region Enable PS remoting
if (-not (Get-PSSessionConfiguration) -or (-not (Get-ChildItem WSMan:\localhost\Listener))) {
Enable-PSRemoting -SkipNetworkProfileCheck -Force
}
#endregion
@izznogooood
izznogooood / django_fetchJS.md
Last active May 21, 2023 20:03
Using JavaScript fetch to send forms to django

The Idea

Using Django to handle login / authentication / db / email etc. Then creating "normal" endpoints for JS/JSframeworks to manipulate/get data from django Models. This means you will need to be logged inn through the Django backend.

The application can be found here.

JavaScript: A function to get the CSRF token

function getCookie(name) {
@alexdlaird
alexdlaird / daemon.cpp
Last active April 7, 2024 16:54
Useful as a starting point for a C++ based Linux daemon application.
#include <dirent.h>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <sys/stat.h>
#include <syslog.h>