Skip to content

Instantly share code, notes, and snippets.

@knoopx
knoopx / README.md
Last active June 17, 2024 16:16
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)

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

@uhaciogullari
uhaciogullari / ModelBuilderExtensions.cs
Created November 15, 2017 23:43
Use Postgres naming conventions in EF Core
static class ModelBuilderExtensions
{
public static void UsePostgresConventions(this ModelBuilder modelBuilder)
{
foreach (var entity in modelBuilder.Model.GetEntityTypes())
{
// Replace table names
entity.Relational().TableName = entity.Relational().TableName.ToSnakeCase();
// Replace column names
@apokalyptik
apokalyptik / debian-jessie-kubernetes-1.3-manual-install-guide.md
Last active November 21, 2023 12:31
Set up Kubernetes on 3 Debian Jessie virtual machines -- No magic

The Goal

Set up Kubernetes on 3 Debian Jessie virtual machines: One master. Two nodes. Additionally do this without any "magic" so that what is required to be running to make everything work is plain and obvious.

We will be using flannel for the inter-machine networking layer. Mainly because it is useful and it seems to be pretty popular.

The Setup

@marekr
marekr / gist:cfa7079245e1fa8dee2e1f0441367e7d
Created June 25, 2016 22:29 — forked from ralph-tice/gist:c2943aa672aaa65ecb59
PostgreSQL settings to aggressively vacuum, this config was used for an 18000 TPS steadystate workload on i2.xlarge
#------------------------------------------------------------------------------
# AUTOVACUUM PARAMETERS
#------------------------------------------------------------------------------
#autovacuum = on # Enable autovacuum subprocess? 'on'
# requires track_counts to also be on.
log_autovacuum_min_duration = 0 # -1 disables, 0 logs all actions and
# their durations, > 0 logs only
# actions running at least this number
# of milliseconds.
@nojaf
nojaf / package.json
Created November 21, 2015 10:19
From TypeScript to Babel to ES5 with webpack
{
"name": "webpack-ts-babel",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
@paulhoux
paulhoux / UnprojectApp.cpp
Created October 26, 2014 21:35
Clean example of rotating and scaling a rectangle, using glm::unProject to convert from mouse to world coordinates.
#include "cinder/app/AppNative.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#undef near
#undef far
using namespace ci;
using namespace ci::app;
using namespace std;
@marekr
marekr / bq20z80.py
Created August 9, 2014 03:39
IDA processor module. Creator: Charlie Miller
----------------------------------------------------------------------
# Processor module template script
# (c) Hex-Rays
import sys
import idaapi
from idaapi import *
# define RAM starting at 18000h of size 100h
# define ROM starting at 0 of size 12100h
@hi2p-perim
hi2p-perim / ssecheck.cpp
Last active June 16, 2024 06:55
Check SSE/AVX instruction support.
/*
Check SSE/AVX support.
This application can detect the instruction support of
SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4a, SSE5, and AVX.
*/
#include <iostream>
#ifdef _MSC_VER
#include <intrin.h>
#endif
@QuantumCD
QuantumCD / Qt 5 Dark Fusion Palette
Created August 15, 2013 21:40
This is a complete (I think) dark color palette for the Qt 5 Fusion theme, as well as a nice style sheet for the tool tips that make them blend better with the rest of the theme. To have immediate effect, be sure to put this in your main function before showing the parent window. Child windows should automatically inherit the palette unless you …
qApp->setStyle(QStyleFactory::create("Fusion"));
QPalette darkPalette;
darkPalette.setColor(QPalette::Window, QColor(53,53,53));
darkPalette.setColor(QPalette::WindowText, Qt::white);
darkPalette.setColor(QPalette::Base, QColor(25,25,25));
darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53));
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
darkPalette.setColor(QPalette::Text, Qt::white);