Skip to content

Instantly share code, notes, and snippets.

View Lyuu17's full-sized avatar
🙃
tired and sleepy

lucx ☆ Lyuu17

🙃
tired and sleepy
View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active September 23, 2024 03:02
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@RubenKelevra
RubenKelevra / fast_firefox.md
Last active September 20, 2024 15:22
Make Firefox fast again
@pabloko
pabloko / 1-D3D9IEOverlay.md
Last active September 29, 2022 16:34
D3D9 Overlay with IE and alpha

D3D9 Overlay with IE and alpha

Many times working with Direct3D9, you want to build a simple GUI to overlay over your graphics, many libraries does this in some way but at some point you may want to use a web browser and options are much more limited. CEF is great, but heavy and IPC can be a real pain to handle, ultralight stopped supporting x86 arch... few other webui libs out there, they all have its pros and cons but we lost the sense of simplicity we wanted on first hand.

Then theres MSHTML (Internet Explorer) that is shipped on every windows os, enough versatile and fast to be used as overlay. Shamefully for Microsoft, this control never supported transparent background, even on .net webforms/WPF webbrowser depends from MSHTML and always cast a background.

This demo explores two ways to overcome this long standing issue and get 1bit alpha or 255bit alpha by color difference interpolation.

  • 1bit alpha: Uses green rgb(0,255,0) background that is simply keyed, can be used on boxed UI with less re
@FBosler
FBosler / SignupLoginModal.js
Last active January 19, 2023 11:19
Backend
import React, { useState } from "react";
import { Modal, Form, Col, Row } from "react-bootstrap";
import axios from "axios";
import DelegatedAuthList from "../DelegatedAuthList";
import {
PaddedContainer,
EmailSymbol,
PasswordSymbol,
ResponsiveHeader4,
@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active September 5, 2024 04:16
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@francoism90
francoism90 / retrieve.py
Last active April 12, 2024 21:16
libtorrent - get seeds/peers + metadata without downloading (DHT/magnet)
#!/usr/bin/env python3
import libtorrent as lt
import time
import json
import os
def write_json(path, contents):
with open(path, 'w', encoding='utf-8') as f:
json.dump(contents, f, default=str, indent=4, sort_keys=True)
@DD3Boh
DD3Boh / gist:6c51fd3c5f91b1042e956771483714de
Created July 19, 2017 14:59
How to merge a newer CAF tag in an android kernel
First go here:
https://wiki.codeaurora.org/xwiki/bin/QAEP/release
This site gives information about all msm soc release details with tag + android version
Search your msm here.. Check the latest one and look for correct android version and mark that tag.
Now open one of the following links (dependent on your linux kernel version)