Skip to content

Instantly share code, notes, and snippets.

@pongloongyeat
pongloongyeat / main.dart
Last active August 23, 2023 03:12
Map.contains
import 'package:collection/collection.dart';
extension ListExtension<E> on List<E> {
/// Checks whether every element of this iterable satisfies [test] while
/// passing the element and the index to [test].
bool everyIndexed(bool Function(int index, E element) test) {
for (var i = 0; i < length; i++) {
final element = this[i];
if (!test(i, element)) return false;
}
@pongloongyeat
pongloongyeat / py-elementary.py
Last active August 13, 2021 10:54
Using Granite with Python
import gi
gi.require_version("Gtk", "3.0")
gi.require_version("Granite", "1.0")
from gi.repository import Gtk
from gi.repository import Granite
class MyWindow(Gtk.Window):
def __init__(self):

elementaryOS 6.0 Daily

Simple checklist to make eOS6.0 (daily build) my daily driver.

Small stuff

  • Install pantheon-tweaks
  • Run G213Colors.py with colour #3465a4 on startup.
  • Make eOS use local time to fix dual boot time sync timedatectl set-local-rtc 1 --adjust-system-clock.
@pongloongyeat
pongloongyeat / autoexec.cfg
Last active August 18, 2020 09:02
CSGO autoexec
// WickedKillington's CSGO config
// Last modified: 18/08/2020
// 1280x960
// Usual rate commands
cl_cmdrate "128"
cl_updaterate "128"
cl_interp "0.0"
cl_interp_ratio "1"
rate "128000"

Pop!_OS Daily Driver Checklist

Simple checklist to make Pop!_OS my daily driver.

Small stuff

  • Install gnome-tweaks sudo apt install gnome-tweaks.
  • Run G213Colors.py with colour #3465a4 on startup.
  • Mount 2TB drive at startup.
  • Make an "Empty File" template.