Skip to content

Instantly share code, notes, and snippets.

@probonopd
probonopd / Wayland.md
Last active July 7, 2024 05:54
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.

In fact, it is merely an incompatible alternative, and not e

@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active June 22, 2024 07:05
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@unitycoder
unitycoder / local-stream-server-win10.md
Last active May 25, 2024 14:24
Local RTMP Stream Server for Windows

https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmfp-server-using-monaserver.153/ (copied here as a backup)

This article is inspired of the great guide of How to set up your own private RTMP server using nginx. https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/

MonaServer is a tiny and scalable open source server which provide protocols RTMFP, RTMP, RTMPE, WebSocket and HTTP. Server applications are written in lua and clients just need to support one of these protocols.

The interest of MonaServer here is the RTFMP broadcast feature that avoid congestion (because it is a UDP protocol) unlike RTMP.

This guide will presents you an easy way to broadcast a video with OBS over RTMFP. Don't worry, you will not need to configure or write any code here :)

@timotgl
timotgl / uninstall-razer-synapse.sh
Last active June 14, 2024 08:59
How to fully uninstall Razer Synapse 2 on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) without using Razer's official uninstall tool
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 )
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra)
# without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Edited with additional steps for later OS X versions,
# contributed by commenters on this gist.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
@unitycoder
unitycoder / SpriteBackgroundRemove.cs
Last active August 2, 2023 14:45
Sprite Background Remover (convert single color mask to transparent)
// original script : http://answers.unity3d.com/answers/252528/view.html
// modified by unitycoder.com
// Usage: Place this script in Editor/ folder
// Start the tool from menu, Window/Tools/Alpha-fy Images
using UnityEngine;
using UnityEditor;
using System.IO;
@jbui1
jbui1 / nanobots.md
Last active December 24, 2022 15:01
Programmable Molecular Robots and Nanobots

"It has become appallingly obvious that our technology has exceeded our humanity." -Albert Einstein

##Intro Nanobots in Medcine

Technology is constantly evolving. For better or for worse, technology has moved forward faster than anything in history. With new devices coming out every few years and our human needs craving for bigger and better things, it make me wonder if technology has moved on in all aspects of life. For example, say the medical field. The medical field is one of the oldest fields in history and having something so new like technology can pose a problem especially when it comes to human life.

The rapid growth of technology has given many fields a chance to grow. However, the medical field has no really embraced its techy roots. Humans are skeptical when it comes to machines for fear that it can be used for the wrong reasons or that the machines lack a conscious. Regardless, it has not stopped dev

@elvisw
elvisw / mirrorlist.mingw32
Last active January 20, 2022 22:43
MSYS2国内源
##
## 32-bit Mingw-w64 repository mirrorlist
## Changed on 2014-11-15
##
##中国科学技术大学开源软件镜像
Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686
##北京理工大学镜像
Server = http://mirror.bit.edu.cn/msys2/REPOS/MINGW/i686
##日本北陆先端科学技术大学院大学 sourceforge 镜像
Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/i686
@masahirompp
masahirompp / User.ts
Last active May 5, 2021 20:04
mongoose + typescript
/// <reference path="../tsd/tsd.d.ts" />
import mongoose = require('mongoose');
import passport = require('passport');
interface IUser extends mongoose.Document {
provider: string;
id: string;
authorId: string;
displayName: string;
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from oauthlib.oauth2 import (
FatalClientError, OAuth2Error, TokenExpiredError, MobileApplicationClient
)
from requests_oauthlib import OAuth2Session, TokenUpdated
@joefitzgerald
joefitzgerald / win-updates.ps1
Created December 31, 2013 23:18
Install All Windows Updates, Rebooting As Many Times As Required
param($global:RestartRequired=0,
$global:MoreUpdates=0,
$global:MaxCycles=10)
function Check-ContinueRestartOrEnd() {
$RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
$RegistryEntry = "InstallWindowsUpdates"
switch ($global:RestartRequired) {
0 {
$prop = (Get-ItemProperty $RegistryKey).$RegistryEntry