Skip to content

Instantly share code, notes, and snippets.

@howyay
howyay / Setting up Postfix on Debian.md
Last active June 23, 2024 15:27
A guide to set up a Postfix + Dovecot IMAP server with complete spf, dkim and dmarc support.

An ultimate guide to Postfix + Dovecot IMAP server with complete SPF, DKIM and DMARC support and additional instructions for a multi-domain setup

In this guide, domain.com will be your root domain and mail.domain.com will be the hostname of your mail server

@Hotell
Hotell / cra-2-ts-css-modules-guide.md
Last active March 25, 2022 16:07
typed css-modules - CRA 2.0

CRA 2.x + TS setup:

This will give you complete intellisense and type safety within your app and CSS modules

typesafe-css-modules

🚨 NOTE

  • refactoring className from ts file wont update your css/scss className, to change class names you have to change it within your .module.scss file
@sabpprook
sabpprook / gist:3a05cdaa0a2bab91de35a9de5d3bd2cf
Created September 19, 2016 23:27
Android ID change via ADB shell
adb shell content query --uri content://settings/secure --where "name=\'android_id\'"
adb shell content delete --uri content://settings/secure --where "name=\'android_id\'"
adb shell content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:7373de1e9e9670c2
@SeanCline
SeanCline / windbg-comcall.md
Last active April 25, 2022 17:10
WinDbg: Getting COM Call target from SendReceive2 stack frame.

Looking at a callstack that is making a COM call to another apartment, look for the SendReceive2 stack frame.

  0:053> kb
  # ChildEBP RetAddr  Args to Child              
  00 1532ed98 752e0ca9 00000002 1532ef44 00000001 ntdll!NtWaitForMultipleObjects+0xc
  01 1532ef1c 756dc2a0 1532eef4 1532ef44 00000000 KERNELBASE!WaitForMultipleObjectsEx+0xdc
  02 1532ef74 75bec1db 00000000 1532efcc 000003e8 user32!MsgWaitForMultipleObjectsEx+0x159
  03 1532efac 75beb438 1532efcc 00000001 1532efd0 combase!CCliModalLoop::BlockFn+0x101
 04 (Inline) -------- -------- -------- -------- combase!ModalLoop+0x50
@controlflow
controlflow / ReflectionTypeVisitor.cs
Last active August 29, 2015 14:25
Simple System.Type visitor to traverse and replace types
using System;
using JetBrains.Annotations;
namespace Smth {
[PublicAPI]
public abstract class ReflectionTypeVisitor<T> {
public virtual T VisitSimpleType(Type type) => default(T);
public virtual T VisitConstructedType([NotNull] Type typeDefinition, [NotNull] Type[] typeArguments) => default(T);
public virtual T VisitTypeParameterType([NotNull] Type typeParameter) => default(T);
public virtual T VisitArrayType([NotNull] Type arrayType) => default(T);
@timrwood
timrwood / moment-immutable.js
Created September 16, 2014 17:16
Immutable Moments
(function (root, factory) {
"use strict";
if (typeof define === 'function' && define.amd) {
define(['moment'], factory);
} else if (typeof exports === 'object') {
module.exports = factory(require('moment'));
} else {
factory(root.moment);
}
}(this, function (moment) {