Skip to content

Instantly share code, notes, and snippets.

@svoisen
svoisen / Of Mice and Men
Created March 21, 2013 19:16
Information on low-level scrolling events on Mac OS X
From the WebKit documentation at:
http://www.opensource.apple.com/source/WebKit/WebKit-7533.16/chromium/src/mac/WebInputEventFactory.mm
// Of Mice and Men
// ---------------
//
// There are three types of scroll data available on a scroll wheel CGEvent.
// Apple's documentation ([1]) is rather vague in their differences, and not
// terribly helpful in deciding which to use. This is what's really going on.
//
@cvoltz
cvoltz / dropbox.patch
Created August 9, 2019 14:54
Patch to dropbox.py to get the correct PID when running Dropbox via flatpak
--- dropbox.py
+++ dropbox.py
@@ -134,11 +134,12 @@
FatalVisibleError("Platform not supported")
def is_dropbox_running():
- pidfile = os.path.expanduser("~/.dropbox/dropbox.pid")
-
try:
- with open(pidfile, "r") as f:
@osipxd
osipxd / paper-versions.json
Last active April 26, 2024 09:23
Paper versions links
{
"latest": "1.20.4",
"versions": {
"1.20.4": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/484/downloads/paper-1.20.4-484.jar",
"1.20.2": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar",
"1.20.1": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar",
"1.20": "https://api.papermc.io/v2/projects/paper/versions/1.20/builds/17/downloads/paper-1.20-17.jar",
"1.19.4": "https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/550/downloads/paper-1.19.4-550.jar",
"1.19.3": "https://api.papermc.io/v2/projects/paper/versions/1.19.3/builds/448/downloads/paper-1.19.3-448.jar",
"1.19.2": "https://api.papermc.io/v2/projects/paper/versions/1.19.2/builds/307/downloads/paper-1.19.2-307.jar",
@merikan
merikan / Jenkinsfile
Last active April 26, 2024 09:19
Some Jenkinsfile examples
Some Jenkinsfile examples
@mbostock
mbostock / .block
Last active April 26, 2024 09:18
Parallel Coordinates
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-parallel-coordinates
@thegreatestminer
thegreatestminer / encoded-20201212150102.txt
Created December 12, 2020 15:01
MobaXTerm Professional x64 License Key [READ COMMENTS]
UEsDBBQAAAAIABNQjFGCf/GfLgAAACwAAAAHAAAAUHJvLmtleTMqdncpCXQOKDAp9woMzEo1MTVOrHAzTjTLME7VNs1LK8owTjQpcU8tcuLlAgBQSwECFAAUAAAACAATUIxRgn/xny4AAAAsAAAABwAAAAAAAAAAAAAAAAAAAAAAUHJvLmtleVBLBQYAAAAAAQABADUAAABTAAAAAAA=
# Powershell refuses to connect to the Netbox API on our setup without this.
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
Param(
[Parameter(Mandatory=$false)][switch]$shutdown=$false,
[Parameter(Mandatory=$false)][switch]$vm=$false
)
# Powershell refuses to connect to the Netbox API on our setup without this.
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
@vishal2376
vishal2376 / FlipAnimation.kt
Created April 25, 2024 17:16
Card Flip Animation using Jetpack Compose
package com.vishal2376.animations.ui.theme
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.EaseInOut
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box