Skip to content

Instantly share code, notes, and snippets.

@robertoschwald
robertoschwald / ConfigHowdyBeta.sh
Last active September 1, 2024 20:05 — forked from swinzy/ConfigHowdy.sh
Config Howdy-Beta for Fedora 39 using GNOME
#!/usr/bin/env bash
set -e
# Configure Fedora PAM to use Howdy for facial recognition
# Configured sudo and GDM login.
# SELinux is also configured to allow Howdy to access necessary resources.
# Notes:
# - This script is tested on Fedora 39.
# - This script is for howdy-beta version, which provides pam_howdy.so
# Reference: https://copr.fedorainfracloud.org/coprs/principis/howdy-beta/
@unfor19
unfor19 / wsl2-aws-vault.md
Last active January 3, 2025 18:37
How to run aws-vault on WSL2 Ubuntu 20.04

I'm glad to see that I'm not the only one who had issues with it 😄 This is how I'm using aws-vault in WSL2 and Ubuntu 20.04

Short version

# All the commands are executed in a WSL2 terminal

# Download
AWS_VAULT_VERSION="v6.3.1" && \
@YukiSnowy
YukiSnowy / main.cpp
Last active April 3, 2025 13:45
example SDL2 Vulkan application
// Windows
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan-1
// Linux
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan
// https://vulkan-tutorial.com/
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>
@bbqtd
bbqtd / macos-tmux-256color.md
Last active April 24, 2025 11:52
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@getify
getify / better-web.md
Created March 12, 2019 13:19
Building That Better Web

Building That Better Web

In honor of the 30th anniversary of the web, I wanted to share a few thoughts about what a better web could aspire to be, and challenge us to move toward it.

The Worser Web

It's tempting to frame "better" simply in terms of improvement and progress, as in how far the web has come over the last 20+ years. As a developer, I like many others get all too excited about fancy new features like Service Workers, WebRTC, and yes, even CSS Grids. The pace of change is dizzying, but it feels like a great problem to have too many awesome features to learn and use!

So in one practical respect, a better web is one that empowers developers and users alike to express themselves and connect with others more fluently.

@robertgonzales
robertgonzales / Frame.js
Created December 12, 2017 03:03
Use React portals to render inside shadow dom and iframes
class Frame extends Component {
componentDidMount() {
this.iframeHead = this.node.contentDocument.head
this.iframeRoot = this.node.contentDocument.body
this.forceUpdate()
}
render() {
const { children, head, ...rest } = this.props
return (
@citrusui
citrusui / 2017-XX-XX-more-info-on-apple-ipsw-downloads.md
Last active February 27, 2022 19:33
An incomplete write-up of my failed attempt to conjure a meaning behind Apple's IPSW URLs.

More info on Apple IPSW downloads

IPSWs are files used by iTunes to update or restore the firmware on a mobile Apple device. Originally used for classic iPods, the IPSW made its way onto the iPhone, iPod touch, iPad, Apple TV, iPad mini, and Apple Watch. Although IPSWs may seem like magic, they are cleverly disguised .zip archives. You can read more about the file format of IPSWs here.

Over a year ago, @q3hardcore on Twitter discovered a technical leak from one of Apple's update servers. For reasons unknown, their Amazon S3 bucket was accidentally published publicly. In other words, going to https://appldnld.s3.amazonaws.com presented you with a wall of XML, full of links to files stored on Apple's update server. I did not think to archive the page before it want back to being protected.

Example: http://appldnld.apple.com/iOS7.1/031-4388.20140310.ZA355/iPad2,1_7.1_11D167_Restore.ipsw

Where appldnld.apple.com is the domain,

@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev
# Put me in ~/.atom/snippets.cson
'.source.js':
'import connect':
'prefix': 'cn'
'body': "import {connect} from 'react-redux';"
'export connect':
'prefix': 'ecn'
'body': "export default connect(mapStateToProps)(${1:MyComponent});"
'import React + Component':