Skip to content

Instantly share code, notes, and snippets.

@kentbrew
kentbrew / lang_chrome_osx.md
Last active May 3, 2024 05:29
How to change the Chrome default language on OSX

How to Change your Chrome Default Language

Open up a Terminal window. (If you have never seen Terminal before, go to Spotlight Search and type "Terminal.")

In the Terminal box, try this:

defaults read com.google.Chrome AppleLanguages

If you see this:

@thesamesam
thesamesam / xz-backdoor.md
Last active May 3, 2024 05:28
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

# i have trouble with window manager for macos, after update with homebrew package manager that packages is yabai
# first : uninstall yabai from homebrew version head is 5.0.1
brew uninstall yabai
# find formula/bottle with hombrew
brew info --github yabai
# you got formula, open new tab with raw option
# download raw.githubusercontent.com with curl
@KW-M
KW-M / Unreal Engine 5 Installed Build Guide.md
Last active May 3, 2024 05:21
How to build Unreal Engine 5 source into an installed (AKA standalone, AKA rocket, AKA "just like" Unreal Engine from the Epic Games Launcher) editor build
  • This guide assumes you want to build the Unreal Engine 5 (UE5) editor from source in order to get a Windows Unreal Engine 5 Editor to share with a team or studio
  • This was writen with the absolute minimum build requirements for our team to avoid taking more disk space and compile time than needed - please modify to fit your needs.
  • Keep in mind that, as of writing, I have little experience with the Unreal build tools, I'm simply documenting what worked for me.
  • Also see this excellent blog post especially if you are building Unreal Engine 4 (UE4): https://www.edwardbeazer.com/unreal-installed-builds-rocket-buids/

Steps

  1. If you do not have it already, download git bash. https://gitforwindows.org/
  2. Get access to the unreal source repo by following this guide: https://www.unrealengine.com/en-US/ue4-on-github
  3. Install Visual Studio 2019 on the C:\ drive for UE5 (Visual Studio 2017 for ue4)
  • Make sure to install the desktop c++ components, windows sdk (current version should be selected by
@sovajri7
sovajri7 / Plex_Hetzner_Wireguard.md
Created November 4, 2023 18:26
Using Plex on Hetzner with Wireguard VPN (Docker).

Using Plex on Hetzner with Wireguard VPN (Docker). First, thanks to ShipkaChalk (https://gist.github.com/ShipkaChalk/629fdc42dad781776d2007fc502188f3) and his original tutorial that helped me a lot to get the client part. With this tutorial, you can route all Plex traffic via Wireguard out of another VPS (2$ IONOS Ubuntu VPS), this can be used for any container but here to bypass the Hetzner block by Plex.

  1. Get yourself a Linux VPS (ex : Ubuntu 22.04)

  2. Make all updates :

sudo apt update

app.use("/graphql", (req, res, next) => {
const startHrTime = process.hrtime();
res.on("finish", () => {
if (req.body && req.body.operationName) {
const elapsedHrTime = process.hrtime(startHrTime);
const elapsedTimeInMs =
elapsedHrTime[0] * 1000 + elapsedHrTime[1] / 1e6;
logger.info({
type: "timing",
@andrew-yang0722
andrew-yang0722 / torch_max_example_classification.py
Created September 12, 2017 11:52
PyTorch Classification Evaluation Example
import torch
label = torch.LongTensor([4,1])
out_mat = torch.FloatTensor(
[[0.1, 0.1, 0.1, 0.1, 0.5],
[0.6, 0.1, 0.1, 0.1, 0.0]])
print "out_mat", out_mat
@tuxfight3r
tuxfight3r / vim-shortcuts.md
Last active May 3, 2024 05:11
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)