Skip to content

Instantly share code, notes, and snippets.

View Rikj000's full-sized avatar
✌️

Rikj000

✌️
View GitHub Profile
@robertkirkman
robertkirkman / .vkBasalt.conf
Last active January 26, 2024 05:26
Alternative player 1 on left player 2 on right solution (AKA "2PV", "SbS") using 3DToElse and vkBasalt. For any splitscreen game. Edit paths etc. to fit your needs
reshadeTexturePath = /home/tacokoneko/.local/share/reshade/Textures
reshadeIncludePath = /home/tacokoneko/.local/share/reshade/Shaders
3DToElse = /home/tacokoneko/.local/share/reshade/Shaders/3DToElse.fx
toggleKey = Home
effects = 3DToElse
@Cybergrany
Cybergrany / WeightedMultiParameterHyperOptLoss.py
Last active April 9, 2022 22:45
WeightedMultiparameterHyperOptLoss.py V 0.3
"""
WeightedMultiparameterHyperOptLoss.py V 0.3
-by Cybergrany
A loss function for Freqtrade's hyperopt feature, which allowes the user
to choose weights, which influence how much each parameter affects the objective.
For example, if I want quick trades and don't care too much about risk, I would
give more weight to trades and less to the sortino.
Most of the code here is based on existing freqtrade code, namely the sortino
function and max drawdown calculations. I've just added a way to incorporate
@ls-dac-chartrand
ls-dac-chartrand / swagit.php
Last active October 21, 2024 19:11
Swag It: Reverse engineer Swagger-PHP annotations from an existing JSON payload
<?php
// -------------------------------------------------------------------------------------
// Add your JSON in the $input to generate Swagger-PHP annotation
// Inspired by: https://github.com/Roger13/SwagDefGen
// HOWTO:
// php -S localhost:8888 -t .
// http://localhost:8888/swagit.php
// -------------------------------------------------------------------------------------
@wrabit
wrabit / DuskConfigOverride.php
Last active February 22, 2023 16:15
Override Laravel config during Dusk tests
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class DuskConfigOverride
{
/**
@ilyasst
ilyasst / python_systemd.md
Last active April 15, 2024 04:34
Run a python script forever using systemd

Run a python script forever

In this section, we are going to show how to run a python script as a systemd service, allowing you to boot it at the start of a Linux machine and to maintain it alive.

Test method: Telegram Bot

We are going to use a very basic Telegram bot in order to test that our script will:

  1. Automatically start when the machine boot
  2. Automatically restart when it crashes/exits for whichever reason
@nerzhulart
nerzhulart / Windows Defender Exclusions for Developer.ps1
Last active November 9, 2024 13:32 — forked from dknoodle/Windows Defender Exclusions VS 2017.ps1
Adds Windows Defender exclusions for developers (Visual Studio, JetBrains Rider, IntellIJ Idea, Git, MsBuild, dotnet, mono etc.)
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null
@ajdruff
ajdruff / fix-git-line-endings
Last active November 11, 2024 03:24
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@woudsma
woudsma / portainer-dokku.md
Last active May 7, 2023 23:04
TLS secured TCP exposed Docker daemon on Dokku host - setup

TLS secured TCP exposed Docker daemon on Dokku host - setup

  1. Create certificates
  2. Edit Docker options
  3. Restart Docker
  4. Copy client certificates from host
  5. (optional) Add remote endpoint in Portainer

Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.


@grimzy
grimzy / git-pull-all
Created September 15, 2017 02:15
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@nzpcmad
nzpcmad / ADFS.postman_collection - Public.json
Last active June 27, 2022 23:03
Postman collection to get userinfo via ADFS 4.0 and OpenID Connect / OAuth 2.0
{
"variables": [],
"info": {
"name": "ADFS Public",
"_postman_id": "3d8a90ce-eb38-fedf-8bfe-b75578dd0810",
"description": "Auth code flow.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{