Skip to content

Instantly share code, notes, and snippets.

@tophtucker
tophtucker / .DS_Store
Last active May 3, 2024 03:34
Measure text
@kulak-at
kulak-at / app.js
Created August 12, 2020 15:31
theme -react
const useThemeDetector = () => {
const getCurrentTheme = () => window.matchMedia("(prefers-color-scheme: dark)").matches;
const [isDarkTheme, setIsDarkTheme] = useState(getCurrentTheme());
const mqListener = (e => {
setIsDarkTheme(e.matches);
});
useEffect(() => {
const darkThemeMq = window.matchMedia("(prefers-color-scheme: dark)");
darkThemeMq.addListener(mqListener);
@nwesterhausen
nwesterhausen / node_exporter_setup.md
Last active May 3, 2024 03:33
node_exporter installation on ubuntu

Installing node_exporter

Steps to install node_exporter

  1. Add user for node_exporter

    sudo useradd --no-create-home --shell /bin/false node_exporter
@Flash-Ser
Flash-Ser / wmob1.js
Created May 11, 2022 19:13
WAME GENERATOR : MADE BY FLASH SER ONLY FOR LYFE MD WHATSAPP BOT
const {
forwardOrBroadCast, bot,
parsedJid,
getBuffer,
} = require('../lib/')
@CMCDragonkai
CMCDragonkai / wework_wifi_on_linux_with_nmcli.md
Last active May 3, 2024 03:30
WeWork WiFi on Linux with `nmcli`

WeWork WiFi on Linux

When using nmcli device wifi connect 'WeWorkWiFi' password '...', you'll get something like:

Error: Failed to add/activate new connection: Failed to determine AP security information

To actually use it, you need to create a connection first and configure it:

Setup Altserver Linux on Raspberry Pi with Wifi Refresh

This is a rough outline on how to setup altserver-linux on the 🍓🍰. Wifi refreshing is enabled through the use of netmuxd, which acts as a proxy from AltServer to the iDevice (replaces/enhances usbmuxd).

Tutorials used

Prerequisites

@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active May 3, 2024 03:28
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

@ukn
ukn / 99-install-facetime-camera.sh
Last active May 3, 2024 03:28 — forked from Stono/99-install-facetime-camera.sh
Install the kernal module required for the facetimehd camera to work on Linux
#!/bin/bash
set -e
export CONFIG_MODULE_SIG=n
export CONFIG_MODULE_SIG_ALL=n
# For current kernel
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}')
temp_dir=$(mktemp -d)
echo "Installing FacetimeHD camera for $KERNELRELEASE"
@shobhitic
shobhitic / MyToken.sol
Last active May 3, 2024 03:27
ERC20 Permit OpenZeppelin Tutorial - https://www.youtube.com/watch?v=lFKcga4Y6Ys
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.7.3/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@4.7.3/token/ERC20/extensions/draft-ERC20Permit.sol";
contract MyToken is ERC20, ERC20Permit {
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}
function mint(address to, uint256 value) external {
@TrevTV
TrevTV / ArcOn10.md
Last active May 3, 2024 03:27
Guide to installing Arc Browser on Windows 10

As this is not an official way of installing Arc, if you encounter any issues do NOT report them to the developers, they did not intend for people to be running Arc on Windows 10.

This guide is a bit more manual since I wanted to respect the developers' wishes and not directly link any downloads to the beta of Arc.

I don't know how this will work with updates, you may just need to redo the process to update it, but I'm not sure

  1. Install this font: https://aka.ms/SegoeFluentIcons (this fixes the icons since Windows 10 doesn't have this font installed by default)
  2. Download the Arc appinstaller and open it in notepad/some other text editor
  3. Copy everything inside and paste it into this website: https://codebeautify.org/xmlviewer (this is optional, but it makes reading and copying from the file easier)
  4. Find the mainpackage @Uri, it should end in Arc.x64.msix, and open that in a new tab. It should download that msix file.