Skip to content

Instantly share code, notes, and snippets.

@ethanmdavidson
ethanmdavidson / gradle_tests_report.gradle.kts
Created February 9, 2021 15:18
Fancy gradle test result logging, in kotlin
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import groovy.time.TimeCategory
import java.util.Date
/**
* based on the groovy code by lwasyl:
* https://gist.github.com/lwasyl/f5b2b4ebe9e348ebbd8ee4cb995f8362
*/
var testResults by extra(mutableListOf<TestOutcome>()) // Container for tests summaries
@lopspower
lopspower / README.md
Last active January 1, 2025 01:07
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@adibhanna
adibhanna / tmux.conf
Last active January 1, 2025 01:02
tmux
#--------------------------------------------------------------------------
# Configuration
#--------------------------------------------------------------------------
# Use Vi mode
setw -g mode-keys vi
# Increase scrollback buffer size
set -g history-limit 10000

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@Siss3l
Siss3l / 0324.md
Last active January 1, 2025 00:58
Intigriti's March 2024 Web Challenge thanks to @M0Z

Intigriti March Challenge

  • Category: Web
  • Impact: Medium
  • Solves: 30

Challenge

Description

# domain/entities.py
from dataclasses import dataclass, field
from datetime import datetime
from uuid import UUID, uuid4
@dataclass
class Account:
oid: UUID
balance: int = 0
created_at: datetime = field(default_factory=datetime.now)
@CaptnCodr
CaptnCodr / Fli.md
Last active January 1, 2025 00:52
A little story about Fli

A little story about Fli

This is my first contribution to the FsAdvent on Sergey Tihon's Blog, thank you Sergey for making this possible every year.

Back in September 2022, a wonderful idea came to my mind. I kept thinking more and more over it and took a note, here is the original gist:

type Shell =
| BASH
| POWERSHELL
| CMD
import SwiftUI
// MARK: - ContentView
// https://x.com/okazz_/status/1870807939944243631
struct ContentView: View {
@State private var progress: Double = 0
var body: some View {
MyGroup {
@localzet
localzet / AITool.md
Created January 17, 2023 10:17
AI Tool Master List
@secemp9
secemp9 / interaction_net.py
Created December 17, 2024 12:39
non-complete implementation of an interaction net
class Agent:
def __init__(self, name, ports=None):
self.name = name
self.ports = ports if ports else []
# Each element of ports is either None or a tuple (other_agent, other_port_index)
def __repr__(self):
return f"{self.name}"
def connect(a, pa, b, pb):