Skip to content

Instantly share code, notes, and snippets.

View uhlhosting's full-sized avatar
🏠
Working from home

Viorel-Cosmin Miron uhlhosting

🏠
Working from home
View GitHub Profile
@onesword0618
onesword0618 / wp-load.php
Last active June 13, 2020 17:21
リソースをどこから取得するのかの定義と読み込みを行っている
<?php
/**
* Bootstrap file for setting the ABSPATH constant
* and loading the wp-config.php file. The wp-config.php
* file will then load the wp-settings.php file, which
* will then set up the WordPress environment.
*
* wp-config の読み込みとABSPATH定数の設定を行うブートストラップファイル。
* wp-config と wp-settings でWordPressの環境のセットアップを行う。
*
@smatplacid
smatplacid / README.md
Last active August 5, 2021 12:54
Oxygen Child Theme Support

Oxygen 'Child Theme' Support

This function is for developers, which use Oxygen and still want to override plugin-files when it reads in their documentation such as

  1. Create a folder in your theme folder called search-filter.
  2. Copy the file wp-content\plugins\search-filter\templates\results.php from the templates folder in to the newly created folder in your theme – wp-content\themes\your-theme-name\search-filter\results.php

Where to put such files, if Oxygen is not a theme and won't uses themes ?

Usage

@rockstardev
rockstardev / btcpayserver_install_env.sh
Last active November 6, 2024 20:07
Setting up BTCPayServer development environment on Linux (Ubuntu)
# Installing prerequisites for BTCPayServer development on Ubuntu
# Install .NET Core SDK 2.2
# https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install?initial-os=linux
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo add-apt-repository universe
<?php
namespace App\Models;
use App\Http\Controllers\ServerLookupController;
use Illuminate\Contracts\Support\MessageBag;
class MailConfig {
const MY_DOMAIN = 'hostineer.com';
@rcg4u
rcg4u / gist:6e40e2738d24472e033f99203bcaee81
Created June 1, 2019 19:47
this is from Sridhar Katakam, this allows seopress to read Oxygen builder content. Get code snippets and add as a function.
add_filter( 'seopress_content_analysis_content', 'sp_content_analysis_content', 10, 2 );
/**
* Filter the analyzed content to add content from Oxygen editor.
* @param string $content Current content in the WordPress editor.
* @param int $id ID of the current entry.
* @return string Modified content.
*/
function sp_content_analysis_content( $content, $id ) {
// HTML of Oxygen's content.
@MuhsinFatih
MuhsinFatih / fix-macos-python.md
Last active May 15, 2025 15:21
How to recover from messed up python installation on mac, and never have to mess with apple's shitty python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.
@lhns
lhns / afterPrintCancelled
Created December 23, 2018 14:44
OctoPrint GCODE Scripts
; disable motors
M84
; disable all heaters
{% snippet 'disable_hotends' %}
{% snippet 'disable_bed' %}
;disable fan
M106 S0
; relative XYZE
@josephbolus
josephbolus / Instructions.txt
Created December 2, 2018 12:23 — forked from NotMedic/Instructions.txt
Siri -> HomeBridge -> HomeBridge-ssh -> iptables
This is a pretty simple setup:
Siri is used to control Homebridge using the HomeKit protocol.
Homebridge has a module named Homebridge-ssh that allows you to run commands over ssh.
There is a shell script on an OpenWrt box to enable, disable, and check the status of a MAC Address block in the FORWARD table.
1. Install node on your platform. I went with 8.9 for no specific reason other than I initially had issues with 10 that probably weren't related..
2. Install homebridge and homebridge-ssh. You should probably also put hombridge-config-ui-x on there too... I used the unsafe-perm parameter after getting a significant number of errors:
sudo -i npm install -g homebridge --unsafe-perm
sudo -i npm install -g homebridge-ssh --unsafe-perm
@romainnorberg
romainnorberg / pre-request-script
Last active September 4, 2019 04:32
Work with OVH-Api using Postman Pre-request scripts (Blog post: https://blog.romainnorberg.be/post/work-with-ovh-api-using-postman)
pm.sendRequest({
url: "https://api.ovh.com/1.0/auth/time",
method: "GET",
headers: {
'Content-Type': 'application/json; charset=utf-8'
},
body: {}
},
function (err, res) {
@askdesign
askdesign / 01-functions.php
Last active September 28, 2020 14:42
Deferring parsing of JavaScript via functions.php
//* OPTION 1 – Deferring parsing of JavaScript via functions.php
//* Alternatively, it is possible to carry out the task by editing one of WordPress core files. To defer parsing of JS, this code should be copied to the bottom of your theme’s functions.php file:
function defer_parsing_of_js ( $url ) {
if ( FALSE === strpos( $url, '.js' ) ) return $url;
if ( strpos( $url, 'jquery.js' ) ) return $url;
return "$url' defer ";
}
add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );