Skip to content

Instantly share code, notes, and snippets.

bruteforks /
Created January 27, 2023 18:18 — forked from saikocat/
[Advice] Summary of Atomic Habits
Nama /
Last active January 27, 2023 18:54
Restore workspaces in sway to displays and move applications to saved workspaces. Maintained in its own repo now:
* setup displays first, e.g. with wdisplay
* run after setting up your displays `python save <profilename>`
* repeat for every display setup
* setup kanshi and make it run `python load <profilename>`
Multiple windows of an application/class aren't handled. No idea how to do so.
Had to alter the default tree, so the outputs are not the ports.
name: Pull Request into Master, Develop and Preprod
- "master"
- "develop"
- "preprod"
bradtraversy /
Last active June 16, 2024 17:28
Setup Webpack with Tailwind CSS

Webpack & Tailwind CSS Setup

Create your package.json

npm init -y

Create your src folder

Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.

pschmitt /
Last active March 26, 2024 01:01
sway ipc script to maximize the currently focused window
#!/usr/bin/env bash
usage() {
echo "Usage: $(basename "$0") [-d DEFAULT_BORDER_PX] [-m MAXIMIZED_BORDER_PX]"
get_waybar_height() {
# Waybar's config is JSONC, ie it contains comments. We need to strip
# these for jq.
grep -v '//' ~/.config/waybar/config | jq -er '.height'
lambda function
exports.handler = async (event) => {
const customerId = event.pathParameters.customerId;
const customer = {'customerId': customerId, 'customerName': "Customer " + customerId };
const response = {
statusCode: 200,
// Uncomment below to enable CORS requests
headers: {
eloylp /
Last active June 22, 2024 18:17
Fedora 35 hibernation with swapfile, only for hibernation and resume

Fedora35 hibernation

This guide helps to configure the hibernation on a default Fedora35 (also worked fine in previous Fedora34) installation by using a swap file. The Fedora35 installation comes with btrfs as default filesystem. Also, it comes with a zram swap device:

$ swapon
/dev/zram0 partition   8G   0B  100
saikocat /
Last active May 31, 2023 21:19
[Advice] Summary of Atomic Habits
mrousavy /
Last active May 27, 2024 21:19
Memoize!!! 💾 - a react (native) performance guide
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and  
returning the cached result when the same
inputs occur again.                                         
                                                     — wikipedia
vcapretz / instagram-like-button.jsx
Created January 15, 2021 14:00
A simple Like button with a nice animation using react-native-reanimated v2, support for my post in
import React from "react";
import Animated, {
} from "react-native-reanimated";
import { Pressable, View, Button, StyleSheet } from "react-native";
import { MaterialCommunityIcons } from "@expo/vector-icons";