Skip to content

Instantly share code, notes, and snippets.

View PegasisForever's full-sized avatar

Pegasis PegasisForever

View GitHub Profile
@probonopd
probonopd / Wayland.md
Last active May 3, 2024 23:46
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.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@developit
developit / .eslintrc.js
Last active January 19, 2024 21:54
Preact CLI 3 + TypeScript starter
module.exports = {
env: {
browser: true
},
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended'
],
@PegasisForever
PegasisForever / BetterAnimatedList.dart
Last active October 28, 2021 13:35
An animated list that can animate items automatically when data changes.
/*
* Copyright (c) Pegasis 2019. Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to use, copy, modify,
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
* to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
*
@ardera
ardera / fakedevicepixelratio.dart
Created November 8, 2019 00:48
A simple flutter widget that can simulate/fake a different pixel ratio for all it's children. Can be the root widget, i.e. the widget given to runApp(). Useful for when your device/emulator doesn't properly calculate the devicePixelRatio.
import 'package:flutter/widgets.dart';
class FakeDevicePixelRatio extends StatelessWidget {
final num fakeDevicePixelRatio;
final Widget child;
FakeDevicePixelRatio({this.fakeDevicePixelRatio, this.child}) : assert(fakeDevicePixelRatio != null);
@override
Widget build(BuildContext context) {
@binki
binki / README.md
Last active February 24, 2024 10:39
Doki Doki Literature Club Base64 Natsuki Message/Poem Starting With T3B

image of base64

@deviantony
deviantony / README.md
Last active February 20, 2024 15:22
Portainer HTTP API by example

DEPRECATION NOTICE

This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!

THE FOLLOWING DOCUMENTATION IS DEPRECATED

Please refer to the link above to get access to our updated API documentation and examples.

@swordfeng
swordfeng / chn_fonts.reg
Last active April 29, 2024 11:36
Chinese font settings in wine
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
"Arial CE,238"="wqy-microhei.ttc"
"Arial CYR,204"="wqy-microhei.ttc"
"Arial Greek,161"="wqy-microhei.ttc"
"Arial TUR,162"="wqy-microhei.ttc"
"Courier New"="wqy-microhei.ttc"
@joakin
joakin / git-find-me-the-fucking-deleted-file.sh
Last active May 2, 2024 07:41
finding a deleted file in a git repository
# If you don't remember the exact path/name, search the log for deleted files
git log --diff-filter=D --summary | grep delete
# Find the file you want to get from the ouput, and use the path
# Find the commits that involved that path
git log --all -- some/path/to/deleted.file
# Bring the file back to life to the current repo (sha commit of parent of commit that deleted)
git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file
@steve-ng
steve-ng / nginx.conf
Last active January 18, 2021 07:55
Nginx reverse proxy wss with ssl
server {
listen 443 ssl;
server_name xxx.xx.io
ssl on;
ssl_certificate /etc/asterisk/certs/xxx.io.pem;
ssl_certificate_key /etc/asterisk/certs/xxx.io.key;
ssl_session_timeout 5m;
@lotem
lotem / luna_pinyin.custom.yaml
Created April 6, 2012 15:46
【朙月拼音】模糊音定製模板
# luna_pinyin.custom.yaml
#
# 【朙月拼音】模糊音定製模板
# 佛振配製 :-)
#
# 位置:
# ~/.config/ibus/rime (Linux)
# ~/Library/Rime (Mac OS)
# %APPDATA%\Rime (Windows)
#