Skip to content

Instantly share code, notes, and snippets.

View fboldog's full-sized avatar

Ferenc Boldog fboldog

  • Budapest, Hungary
View GitHub Profile
@Hakky54
Hakky54 / cheat_sheet_http_client_ssl_configuration_for_java_kotlin_scala.md
Last active August 18, 2022 11:56
Cheat Sheet - Http Client SSL TLS Configuration for Java Kotlin and Scala with example http requests
@sebastian-dev
sebastian-dev / test.cs
Created September 30, 2019 16:36
ADL2 Log
using System;
using System.Runtime.InteropServices;
namespace ATIDisplay
{
static class Kernel32
{
@morganfw
morganfw / printer.cfg
Created June 18, 2019 19:39
Klipper configuration file for Ender-3/Ender-3 PRO with TMC2208 in UART mode
#####################################################################################
# SKR v1.3 Configuration for Ender 3/Ender 3 PRO
# X, Y, Z and E are Eryone TMC2208 v1.2 in UART Mode.
# BLTouch
# Source: https://gist.github.com/zwnk/92066555145cddecfd7df92a713dc5f1
#####################################################################################
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
@knoopx
knoopx / README.md
Last active April 29, 2024 15:37
Creality Ender 3 Stock Factory Vref

Creality3D v1.1.2 stock vref values

A4988 Drivers
Vref set to ~90% of stepper rated current
Rs = 0.1ohm

X = 0,58v (0,725A)
Y = 0,58v (0,725A)
Z = 0,58v (0,725A)
@chrisbanes
chrisbanes / KotterKnife.kt
Last active February 7, 2021 15:25
LifecycleAware KotterKnife
package kotterknife
import android.app.Activity
import android.app.Dialog
import android.app.DialogFragment
import android.app.Fragment
import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.LifecycleObserver
import android.arch.lifecycle.LifecycleOwner
import android.arch.lifecycle.OnLifecycleEvent
@Brainiarc7
Brainiarc7 / skylake-tuning-linux.md
Last active May 24, 2024 09:26
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

@LouisCAD
LouisCAD / BitFlags.kt
Last active December 24, 2022 16:28
Allows simple bit flags operation on int values in kotlin. Now available in Splitties: https://github.com/LouisCAD/Splitties/tree/master/modules/bitflags Inspired by: http://stackoverflow.com/a/40588216/4433326
@file:Suppress("NOTHING_TO_INLINE")
import kotlin.experimental.and // Used for Byte
import kotlin.experimental.inv // Used for Byte
import kotlin.experimental.or // Used for Byte
inline fun Int.hasFlag(flag: Int) = flag and this == flag
inline fun Int.withFlag(flag: Int) = this or flag
inline fun Int.minusFlag(flag: Int) = this and flag.inv()
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <cstdint>
#include <memory>
#include <map>
#include <list>
#include <vector>
#include <set>
#include <algorithm>
#include "crypto.h"
/*
Scramble/descramble raw NAND dumps from the NES Classic.
plutoo 2016
Cheers to brizzo, derrek.
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
@roschlau
roschlau / event.kt
Last active July 7, 2017 13:32 — forked from orangy/event.kt
C#-style events in Kotlin
class Event<T> {
private val handlers = arrayListOf<(T) -> Unit>()
operator fun plusAssign(handler: (T) -> Unit) { handlers.add(handler) }
operator fun invoke(value: T) { for (handler in handlers) handler(value) }
}
val e = Event<String>() // define event
fun main(args : Array<String>) {
e += { println(it) } // subscribe