Skip to content

Instantly share code, notes, and snippets.

@sandren
sandren / reset.css
Last active January 18, 2025 21:20
reset.css: An annotated CSS reset extending the default Tailwind preflight styles to be more in line with developer expectations and the functional CSS methodology.
@tailwind base;
/*
* Oldschool, top left anchored repeating backgrounds should be opt-in instead
* of opt-out in 2022, lol.
*/
*,
*::before,
*::after {
min-width: 0;
@vwbusguy
vwbusguy / auto-profile-update.sh
Last active January 18, 2025 21:21
Auto Update for power-profiles-daemon
#!/bin/bash
dbus-monitor --system "type='signal',path='/org/freedesktop/UPower/devices/battery_BAT0',member='PropertiesChanged'" | while read LINE; do
echo ${LINE} | grep battery_BAT0 | grep -q PropertiesChanged
if [ $? -eq 0 ]; then
BATT_STAT=$(dbus-send --print-reply=literal --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.Get string:org.freedesktop.UPower.Device string:State | awk '{ print $3; }')
if [ $BATT_STAT -eq 1 ] || [ $BATT_STAT -eq 4 ]; then
LEVEL=$(powerprofilesctl list | grep -q performance && echo "performance" || echo "balanced")
elif [ $BATT_STAT -eq 5 ]; then
LEVEL="balanced"
@htr3n
htr3n / macos-ramdisk.md
Last active January 18, 2025 21:17
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@cjddmut
cjddmut / EasingFunctions.cs
Last active January 18, 2025 21:17
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 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
@rxaviers
rxaviers / gist:7360908
Last active January 18, 2025 21:12
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active January 18, 2025 21:11
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@marcan
marcan / wiipointer.c
Last active January 18, 2025 21:10
Wiimote sensor bar tracking and pointer control algorithm
/*
* Algorithm to process Wiimote IR tracking data into a usable pointer position
* by tracking the sensor bar.
*
* Copyright (c) 2008-2011 Hector Martin "marcan" <marcan@marcan.st>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
@Alot1z
Alot1z / TheosWSL.md
Created January 18, 2025 21:09 — forked from 6ilent/TheosWSL.md
Guide on how to install Theos on Ubuntu for Windows 10

Installing Theos on Windows 10

Step 1 (Setting up Windows for WSL Ubuntu)

  1. Make sure your Windows is up to date. This only works on Windows 10 so make sure you have the latest Windows 10 update.

  2. Open Windows Powershell (NOT Command Prompt).

  3. Inside Powershell run the following command to enable WSL(Windows Subsystem Linux). This feature is harmless and won't do weird things to your computer on its own.

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

@6ilent
6ilent / TheosWSL.md
Last active January 18, 2025 21:09
Guide on how to install Theos on Ubuntu for Windows 10

Installing Theos on Windows 10

Step 1 (Setting up Windows for WSL Ubuntu)

  1. Make sure your Windows is up to date. This only works on Windows 10 so make sure you have the latest Windows 10 update.

  2. Open Windows Powershell (NOT Command Prompt).

  3. Inside Powershell run the following command to enable WSL(Windows Subsystem Linux). This feature is harmless and won't do weird things to your computer on its own.

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux