Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cftang0827
cftang0827 / pppoe.service
Created November 23, 2018 19:24
systemd for pppoe pon network connection
[Unit]
Description=pppoe
[Service]
Type=simple
WorkingDirectory=/usr/bin/
ExecStart=/usr/bin/pon dsl-provider
Restart=always
[Install]
@rikturr
rikturr / sklearn-n-jobs-estimators.py
Created February 9, 2021 19:47
sklearn-n-jobs-estimators
from sklearn.utils import all_estimators
import inspect
has_n_jobs = []
for est in all_estimators():
s = inspect.signature(est[1])
if 'n_jobs' in s.parameters:
has_n_jobs.append(est)
print(has_n_jobs)
@usagimaru
usagimaru / HiddenMacOSDebuggingPanel.md
Last active April 23, 2024 08:34
Enables useful debugging panel in macOS apps

Use _NS_4445425547 or NS🐞 for enables debuggging panel. When enabled it, a ladybug 🐞 menu appears in the app menu bar.

“4445425547” means DEBUG in Unicode table.

0x44=D
0x45=E
0x42=B
0x55=U
0x47=G

@NewComer00
NewComer00 / edit_rootfs.sh
Created April 23, 2024 07:55
An automation bash script for chroot-ing into the rootfs partition of a given disk image
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
ARGPARSE_SCRIPT="$SCRIPT_DIR/argparse.bash"
if [[ ! -f "$ARGPARSE_SCRIPT" ]]; then
>&2 echo "[ERROR] '$SCRIPT_DIR/argparse.bash' does not exist! Please download it from 'https://github.com/nhoffman/argparse-bash/raw/master/argparse.bash'."
exit 1
fi
@darrarski
darrarski / CustomIntensityVisualEffectView.swift
Last active April 23, 2024 08:32
UIVisualEffectView subclass that allows to customise effect intensity
import UIKit
final class CustomIntensityVisualEffectView: UIVisualEffectView {
/// Create visual effect view with given effect and its intensity
///
/// - Parameters:
/// - effect: visual effect, eg UIBlurEffect(style: .dark)
/// - intensity: custom intensity from 0.0 (no effect) to 1.0 (full effect) using linear scale
init(effect: UIVisualEffect, intensity: CGFloat) {
theEffect = effect
@ClemRz
ClemRz / _readme.md
Last active April 23, 2024 08:32
This is how you download a KML from alltrails.com without needing a PRO account.
@n1chre
n1chre / emoji.txt
Created October 14, 2017 11:25
Unicode emojis
ʘ‿ʘ
Innocent face
ಠ_ಠ
Reddit disapproval face
(╯°□°)╯︵ ┻━┻
Table Flip / Flipping Table
┬─┬ ノ( ゜-゜ノ)
@dabodamjan
dabodamjan / MailComposeViewController.swift
Last active April 23, 2024 08:32
Sending a contact us email on iOS 14 (can be also used with SwiftUI)
//
// Feel free to use this code in your project.
// Inspired by SO answer https://stackoverflow.com/a/65743126
// Uses DeviceKit as a dependency https://github.com/devicekit/DeviceKit
//
import Foundation
import MessageUI
import DeviceKit
@pablotolentino
pablotolentino / Visual Studio 2022 Product Key
Created November 20, 2021 20:41
Visual Studio 2022 Enterprise Product key
Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
@LukeMathWalker
LukeMathWalker / audit.yml
Last active April 23, 2024 08:29
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit: