Skip to content

Instantly share code, notes, and snippets.

@renventura
renventura / woocommerce-settings-page.php
Created December 26, 2017 02:52
Implement a custom WooCommerce settings page, including page sections
<?php
/**
* WooCommerce settings page
*
* This code creates a full WooCommerce settings page by extending the WC_Settings_Page class.
* By extending the WC_Settings_Page class, we can control every part of the settings page.
*
* @author Ren Ventura <renventura.com>
*/
@rxaviers
rxaviers / gist:7360908
Last active March 29, 2024 09:13
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@positron48
positron48 / wsl-web-server.md
Last active March 29, 2024 09:08
Поднимаем web-server под WSL (nginx + php-fpm + mysql)

Поднимаем web-server под WSL

Основной стек: nginx + mysql + php-fpm.

Предполагается, что вы только что настроили WSL в своей системе и установили чистую ubuntu 18.04 LTS.

Почему не apache? С точки зрения производительности, быстродействия, а как следствие - нагрузки - связка nginx + php-fpm показывает себя гораздо лучше. Есть в этом решении и минусы - мы лишаемся удобного .htaccess и все необходимые настройки будем вынуждены производить в конфигах nginx и php, но оно того стоит.

@thegreatestminer
thegreatestminer / encoded-20201212150102.txt
Created December 12, 2020 15:01
MobaXTerm Professional x64 License Key [READ COMMENTS]
UEsDBBQAAAAIABNQjFGCf/GfLgAAACwAAAAHAAAAUHJvLmtleTMqdncpCXQOKDAp9woMzEo1MTVOrHAzTjTLME7VNs1LK8owTjQpcU8tcuLlAgBQSwECFAAUAAAACAATUIxRgn/xny4AAAAsAAAABwAAAAAAAAAAAAAAAAAAAAAAUHJvLmtleVBLBQYAAAAAAQABADUAAABTAAAAAAA=
@clample
clample / dualboot.md
Last active March 29, 2024 09:03
NixOS Ubuntu Dual Boot

NixOS Ubuntu Dual Boot

Why?

After using NixOS for a year, I've found it to be a great operating system. When the software I need is on nixpkgs, things work out great. When I need to install software from outside of nixpkgs, though, it can become a pain. Trying to figure out the quirks of some closed source application can become pretty complicated. It would be great to package it and contribute it back to nixpkgs, but a lot of the time I just want to have the application working as soon as possible.

Since Ubuntu is a more standard linux distribution, I hope that it's better supported by some of these closed source applications. By dual booting, it's possible to get the best of both worlds.

Alternatives to Dual Booting

@sebastiansommer
sebastiansommer / adbToggleAirplane.sh
Created May 1, 2018 09:50
Toggle airplane mode with adb and restart personal hotspot.
adb shell settings put global airplane_mode_on 1 && adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
sleep 15
adb shell settings put global airplane_mode_on 0 && adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
adb shell am start -n com.android.settings/.TetherSettings
adb shell input keyevent 20
adb shell input keyevent 66
@SQLJames
SQLJames / proxmox-realtek.md
Last active March 29, 2024 09:01
proxmox realtek driver issues
.
├── books
│   ├── handlers.go
│   └── models.go
├── config
│   └── db.go
└── main.go
@EnigmaCurry
EnigmaCurry / vpn_namespace.md
Created April 7, 2016 02:28
OpenVPN and browser specific network routing with ip netns

OpenVPN and browser specific network routing with ip netns

Create network bridge

A network bridge allows us to have a virtual router that we can plug multiple network interfaces into. The IP address is assigned to the bridge rather than the individual network interface.

Create the bridge device, br0 :

@OrionReed
OrionReed / DOM3D.js
Last active March 29, 2024 08:56
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; // ¯\\_(ツ)_/¯