Skip to content

Instantly share code, notes, and snippets.

@shayne
shayne / !Tailscale Unraid Setup.bash
Last active June 9, 2023 16:02
Tailscale Unraid Setup
########################################################################
#### DEPRECATED in favor of https://github.com/deasmi/unraid-tailscale
########################################################################
# /boot/config/go
# add the following...
# Tailscale
bash /boot/config/tailscale/install.sh
@SorenV
SorenV / build.gradle.kts
Created July 29, 2019 22:12
build.gradke.kts
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfigWriter
val kotlinVersion = "1.3.41"
val kotlinxHtmlVersion = "0.6.12"
val kotlinExtensionsVersion = "1.0.1-pre.80-kotlin-1.3.41"
val reactVersion = "16.8.6-pre.80-kotlin-$kotlinVersion"
val reactDomVersion = "16.8.6-pre.80-kotlin-$kotlinVersion"
val reactReduxVersion = "5.0.7-pre.80-kotlin-$kotlinVersion"
val reduxVersion = "4.0.0-pre.80-kotlin-$kotlinVersion"
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@cy6erGn0m
cy6erGn0m / merge-maps.kt
Created May 20, 2015 14:41
Merge two maps with custom reduce function for Kotlin
private fun <K, V> Map<K, V>.mergeReduce(other: Map<K, V>, reduce: (V, V) -> V = { a, b -> b }): Map<K, V> {
val result = LinkedHashMap<K, V>(this.size() + other.size())
result.putAll(this)
other.forEach { e ->
val existing = result[e.key]
if (existing == null) {
result[e.key] = e.value
}
else {
@polbins
polbins / README.md
Last active September 6, 2019 11:08
Android Response Caching using Retrofit 1.9 + OkHttp 2.2

Android REST Controller with Cache-Control

Android REST Controller with Simple Cache Control Headers using Retrofit 1.9.0 + OkHttp 2.2.0

@kmansoft
kmansoft / drawable_convert.py
Created May 22, 2012 21:39
A simple script to create lower-resolution Android drawables from higher-resolution ones.
#!/usr/bin/python
import sys
import argparse
import os
import re
'''
A simple script to create lower-resolution Android drawables from higher-resolution ones.
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@netj
netj / memusg
Last active January 29, 2024 15:04
memusg -- Measure memory usage of processes
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
############################################################################
# Copyright 2010 Jaeho Shin. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #