Skip to content

Instantly share code, notes, and snippets.

@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active May 7, 2024 13:38
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@LasseR15
LasseR15 / README.md
Last active May 7, 2024 13:37
Install Steam in a unprivileged LXC in Proxmox with GPU passthrough

Install Steam in a unprivileged LXC in Proxmox with GPU passthrough

Tested working features/Setup notes

  • Using KasmVNC as a vnc server (access the desktop via your browser)
  • Unprivileged LXC in Proxmox 7.4 (no extra features enabled)
  • Running Debian 12
  • AMD APU passthrough from host CPU (should also work with Intel and Nvidia, but haven't tested it)
  • Linux native aswell as Windows (Proton) games

My Hardware-Setup

@ThioJoe
ThioJoe / Appx-Uninstaller.ps1
Last active May 7, 2024 13:37
A basic script for uninstalling a list of app packages in Windows 10/11, including those pre-installed with Windows
# A basic script for uninstalling app packages in Windows 10/11, including those pre-installed with Windows
#
# Note: If you get an error about the script not being allowed to run, the below command will change the execution polciy temporarily for one session only:
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
#
# To execute the script, open a Powershell window to the directory with the script and run the following command using your scripts file name (and don't forget the .\ )
# .\WhateverScriptName.ps1
# -------------------------------------------------------------------------------------------
# Script by ThioJoe - https://github.com/ThioJoe
@journey-ad
journey-ad / 2233.zenra.js
Last active May 7, 2024 13:36
哔站直播间的2233娘挂件替换为全裸版本
// ==UserScript==
// @name 哔站直播全裸2233娘
// @description 哔站直播间的2233娘挂件替换为全裸版本
// @description:zh-TW 嗶站直播間的2233娘掛件替換為全裸版本
// @namespace https://github.com/journey-ad
// @author journey-ad
// @include *://live.bilibili.com/*
// @require https://cdn.jsdelivr.net/jquery/1.12.4/jquery.min.js
`--> TORCH_LOGS="output_code" python optim_repro.py
[WARNING]:Profiler function <class 'torch.autograd.profiler.record_function'> will be ignored
[DEBUG]:Output code:
# AOT ID: ['0_inference']
from ctypes import c_void_p, c_long
import torch
import math
import random
import os
@MANOJ-M-01
MANOJ-M-01 / letterboxd follower Bot.js
Last active May 7, 2024 13:35
Get follower in letterboxd
------------------------------------------------------------------
// Version 3
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
var elements = document.querySelectorAll( 'a[data-recaptcha-action=follow]:not([style*="display: none"]):not([style*="display: none"])' );
async function follow(){
for(const el of elements){
await sleep(2000);
el.click();
@erus
erus / \etc\grub.d\91_tune_demo
Created August 27, 2022 08:47
ARCHWIKI_GRUB_INIT_TUNE
#!/bin/sh
exec tail -n +3 $0
menuentry "INIT_TUNE Demos" {
echo "Close Encounters/5 Tone"
play 480 900 2 1000 2 800 2 400 2 600 3
echo "Fur Elise (note long)"
play 480 420 1 400 1 420 1 400 1 420 1 315 1 370 1 335 1 282 3 180 1 215 1 282 1 315 3 213 1 262 1 315 1 335 3 213 1 420 1 400 1 420 1 400 1 420 1 315 1 370 1 335 1 282 3 180 1 215 1 282 1 315 3 213 1 330 1 315 1 282 3
echo "Berlioz's extract from Sabbath Night of Symphonie Fantastique"
play 312 262 3 247 3 262 3 220 3 247 3 196 3 220 3 220 3 262 3 262 3 294 3 262 3 247 3 220 3 196 3 247 3 262 3 247 5 220 1 220 5
echo "Oldskool Batman tune"
@vovavili
vovavili / app.py
Last active May 7, 2024 13:35
Streamlit + Firebase authorization example
"""Module for handling authentication, interactions with Firebase and JWT cookies.
This solution is refactored from thestreamlit_authenticatorpackage . It leverages JSON
Web Token (JWT) cookies to maintain the users login state across browser sessions. For the
backend, It uses Googles Firebase Admin Python SDK. This solution ensures that the content
of the page and user settings panel are only displayed if the user is authenticated. Similarly,
the login page can only be accessed if the user is not authenticated. Upon registration, the
user is sent a verification link to their e-mail address.
Important - to make this app run, put the following variables in your secrets.toml file:
COOKIE_KEY - a random string key for your passwordless reauthentication
@cquangc
cquangc / app.py
Created June 30, 2023 05:26 — forked from vovavili/app.py
Streamlit + Firebase authorization example
"""Module for handling authentication, interactions with Firebase and JWT cookies.
This solution is refactored from thestreamlit_authenticatorpackage . It leverages JSON
Web Token (JWT) cookies to maintain the users login state across browser sessions. For the
backend, It uses Googles Firebase Admin Python SDK. This solution ensures that the content
of the page and user settings panel are only displayed if the user is authenticated. Similarly,
the login page can only be accessed if the user is not authenticated. Upon registration, the
user is sent a verification link to their e-mail address.
Important - to make this app run, put the following variables in your secrets.toml file:
COOKIE_KEY - a random string key for your passwordless reauthentication
@LokeshKumarES
LokeshKumarES / 3_Swapping_of_Two_Numbers_without_third_variable.c
Created August 12, 2019 05:19
Q.6 Two numbers are input through the keyboard into two locations C and D. Write a program to interchange the contents of C and D.
#include<Stdio.h>
int main()
{
int C, D, T;
printf("Enter the value of C: ");
scanf("%d", &C);
printf("Enter the value of D: ");
scanf("%d", &D);