Skip to content

Instantly share code, notes, and snippets.

View johanoloflindberg's full-sized avatar
💭
Ready to work 😃

WEBBAB johanoloflindberg

💭
Ready to work 😃
View GitHub Profile
@paulfioravanti
paulfioravanti / build.txt
Created October 22, 2018 23:42
Result of running `bundle exec jekyll build --trace --verbose` on my Jekyll site
Logging at level: debug
Configuration file: /Users/paul/paulfioravanti.github.io/_config.yml
GitHub Pages: github-pages v192
GitHub Pages: jekyll v3.7.4
Requiring: jekyll-github-metadata
Dotenv not found. Skipping
Requiring: jekyll-seo-tag
Requiring: jekyll-feed
Requiring: jekyll-gist
Requiring: jekyll-include-cache
@hedqvist
hedqvist / functions.php
Last active April 9, 2023 13:14
Company name as Name and customer name as YourReference
<?php
/**
* @snippet WooCommerce - Fortnox plugin by Redlight Media - Add Company Name to Fortnox order Name
* @author Redlight Media AB / Christopher Hedqvist
* @compatible WooCommerce 3.3.5
*/
function redlight_fortnox_order_companyname( $orderData, $order_id) {
$order = new WC_Order($order_id);
if(!empty($order->get_billing_company())){
$orderData['Order']['CustomerName'] = $order->get_billing_company();
@tbreuss
tbreuss / readme.md
Created August 3, 2018 05:52
README.md Template

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@davidrea
davidrea / erx-setup.md
Last active August 7, 2024 07:25
EdgeRouter X Setup Journal

Setup Journal for EdgeRouter X

Out-of-box

  1. Power up, connect to eth0
  2. Wait for cold boot sequence; can be up to 2 minutes
  3. Access:
  1. Add admin user, log in as admin user, delete default user
@hedqvist
hedqvist / functions.php
Last active April 9, 2023 13:14
Add Company name to Fortnox Order/Customer
<?php
/**
* @snippet WooCommerce - Fortnox plugin by Redlight Media - Add Company Name to Fortnox order Name
* @author Redlight Media AB / Christopher Hedqvist
* @compatible WooCommerce 3.3.5
*/
function redlight_fortnox_order_companyname( $orderData, $order_id) {
$order = new WC_Order($order_id);
if(!empty($order->get_billing_company())){
$orderData['Order']['CustomerName'] = $order->get_billing_company().": ";
@hedqvist
hedqvist / functions.php
Last active April 9, 2023 13:15
Sätter Fakturatyp och Betalsätt baserat på betalsätt i WooCommerce :)
<?php
/**
* @snippet WooCommerce - Fortnox plugin by Redlight Media - Set InvoiceType depending on payment method via functions.php
* @author Redlight Media AB / Christopher Hedqvist
* @compatible WooCommerce 3.2.5
*/
function redlight_fortnox_payment_method_invoicetype($invoice, $order_id) {
$order = wc_get_order($order_id);
$order_payment_method = $order->get_payment_method();
switch( $order_payment_method ) {
@bsodmike
bsodmike / edgemax-ad-blocker-dnsmasq.md
Last active September 4, 2023 18:28
HOWTO Ubiquity EdgeMAX Ad Blocking Content Filtering using EdgeRouter

Ubiquity EdgeMAX Ad Blocking Content Filtering using EdgeRouter

This is based on a guide on the Ubnt forums.

Log into your Edgerouter and run the following - sudo -i && vi /config/user-data/update-adblock-dnsmasq.sh This will switch you to the root user and open up vi.

#!/bin/bash
$mail->Host = "HOSTINGER_SMTP_HOST_HERE";
//Set the SMTP port number - likely to be 25, 465 or 587
$mail->Port = HOSTINGER_SMTP_PORT_HERE;
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
//Username to use for SMTP authentication
$mail->Username = "YOUR_SMTP_USERNAME";
//Password to use for SMTP authentication
$mail->Password = "YOUR_SMTP_PASSWORD";
//Set who the message is to be sent from
<?php
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$from = "[email protected]";
$to = "[email protected]";
@johanoloflindberg
johanoloflindberg / functions.php
Created July 8, 2017 03:20 — forked from ekandreas/functions.php
Block external WordPress API request
/**
* Block external WordPress API request
*/
function wp_api_block_request($pre, $args, $url)
{
if (strpos($url, 'api.wordpress.org')) {
return true;
} else {
return $pre;
}