Skip to content

Instantly share code, notes, and snippets.

View krayfaus's full-sized avatar
🌼
Overthinking modular design

Italo Oliveira krayfaus

🌼
Overthinking modular design
View GitHub Profile
@kotarella1110
kotarella1110 / Bad.jsx
Last active April 27, 2021 16:49
Best way to define styled-components
import React from 'react';
import styled from 'styled-components';
const Title = styled.h1`
font-size: 1.5em;
text-align: center;
color: palevioletred;
`;
const Wrapper = styled.section`
@SocraticBliss
SocraticBliss / ps4_mono_to_il.py
Last active September 14, 2023 00:40
PS4 MONO binaries to IL MONO binaries
#!/usr/bin/env python
'''
PS4 MONO binaries to IL MONO binaries by SocraticBliss (R)
The script recursively searches the directories for PS4 MONO DLL and EXE files,
finds the scekrit magic for them and then spits them out in the same directory...
1) Place this script in the top-most directory
2) python ps4_mono_to_il.py
@nathanverrilli
nathanverrilli / InstallConsoleFont.ps1
Last active January 26, 2024 15:43
Add a font to the list of permissible console fonts for windows powershell terminal // painlessly edit the relevant registry key
param (
[string]$FontName,
[string]$FontFile,
[switch]$Help
);
function isAdminMode() {
return ([Security.Principal.WindowsPrincipal] `
[Security.Principal.WindowsIdentity]::GetCurrent() `
@andrewrk
andrewrk / microsoft_craziness.h
Created September 1, 2018 14:35
jonathan blow's c++ code for finding msvc
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
@TomFaulkner
TomFaulkner / ubuntu18.04-vfio.md
Last active May 20, 2025 07:47
VFIO Setup on Ubuntu 18.04
@ddevault
ddevault / Makefile
Last active February 20, 2024 14:17
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
@0Camus0
0Camus0 / LinuxWayland.cpp
Created February 11, 2018 04:53
Wayland
#include <video/GLDriver.h>
#include <core/LinuxFramework.h>
#include <stdio.h>
#include <sys/time.h>
extern int g_AvoidInput;
extern std::vector<std::string> g_args;
namespace t800 {
#ifdef USING_WAYLAND_NATIVE
struct wl_compositor *wlnd_compositor = 0;
@wanglf
wanglf / vscode-extension-offline.md
Last active August 12, 2025 10:53
Download VS Code extensions as VSIX

How to use?

  • Copy content of vsix-bookmarklet, create a bookmark in your browser.
  • Navigate to the web page of the VS Code extension you want to install.
  • Click the bookmark you just created, then click the download button.
    download
  • After download finished, rename the file extension to *.vsix.
  • In VS Code, select Install from VSIX... in the extension context menu.
    vsc
@primaryobjects
primaryobjects / m3u8.md
Last active August 15, 2025 10:54
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@nunof07
nunof07 / example.ts
Last active July 21, 2023 23:07
TypeScript final and frozen class decorators
import { final } from './final.ts';
import { frozen } from './frozen.ts';
@final
@frozen
export class Example {
}
export class ExampleSub extends Example {
}