Skip to content

Instantly share code, notes, and snippets.

View noelboss's full-sized avatar

noelboss noelboss

View GitHub Profile
@noelboss
noelboss / RangeDownloadBoss.module.php
Last active June 21, 2018 15:15
Range Download – Usage: wire('modules')->get('ProcessPageView')->sendFile($page, $filename);
<?php
/**
* © noelboss.com
*
* This source file is subject to the license file that is bundled
* with this source code in the file LICENSE.
*
* File created/changed: 2018-06-21T16:24:02+02:00
*/
@noelboss
noelboss / C9 Dev
Created February 22, 2018 11:57 — forked from edhaase/C9 Dev
# Copy this to Dockerfile
# Build with `sudo docker build -t c9 .`
# Resulting container is c9
FROM ubuntu:14.04
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
@noelboss
noelboss / ICF Advents Kalender
Created November 8, 2017 10:40
Füge einen Adventskalender zu Deiner Seite hinzu
[av_section color='main_color' custom_bg='' src='' attachment='' attachment_size='' attach='scroll' position='top left' repeat='no-repeat' video='' video_ratio='16:9' min_height='' min_height_px='500px' padding='default' shadow='no-shadow' bottom_border='no-border-styling' id='adv-cal' custom_class='']
[av_one_fourth first]
[av_image src='bild-1.png' attachment='17011' attachment_size='full' align='center' animation='no-animation' link='' target='' styling='' caption='' font_size='' appearance='' custom_class='not-active'][/av_image]
[/av_one_fourth][av_one_fourth]
[av_image src='bild-2.png' attachment='17012' attachment_size='full' align='center' animation='no-animation' link='' target='' styling='' caption='' font_size='' appearance='' custom_class='not-active'][/av_image]
@noelboss
noelboss / woocommerce-shop-customer-export.sql
Created October 12, 2017 09:19
Export WooCommerce Shop Customers…
SELECT
MAX(CASE WHEN pm.meta_key = '_customer_user' THEN pm.meta_value END) as 'customer_id',
MAX(CASE WHEN pm.meta_key = '_billing_first_name' THEN pm.meta_value END) as 'billing_first_name',
MAX(CASE WHEN pm.meta_key = '_billing_last_name' THEN pm.meta_value END) as 'billing_last_name',
MAX(CASE WHEN pm.meta_key = '_billing_email' THEN pm.meta_value END) as 'billing_email',
MAX(CASE WHEN pm.meta_key = '_billing_phone' THEN pm.meta_value END) as 'billing_phone' ,
MAX(CASE WHEN pm.meta_key = '_billing_address_1' THEN pm.meta_value END) as 'billing_address_1',
MAX(CASE WHEN pm.meta_key = '_billing_address_2' THEN pm.meta_value END) as 'billing_address_2',
MAX(CASE WHEN pm.meta_key = '_billing_postcode' THEN pm.meta_value END) as 'billing_postcode',
MAX(CASE WHEN pm.meta_key = '_billing_city' THEN pm.meta_value END) as 'billing_city',
@noelboss
noelboss / git-deployment.md
Last active March 7, 2024 02:21
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@noelboss
noelboss / log.md
Last active June 21, 2016 22:12
Laravel Project initialization…

Intial setup

install laravel

$ composer global require "laravel/installer"

Edit /.profile and "/.composer/vendor/bin" to PATH

$ laravel new project-name; cd project-name;
@noelboss
noelboss / .htaccess
Last active May 22, 2020 12:34
Serve files from server when not available on your local machine
# Get all wp-content files from remote if localy not available (Perfect for local development environment
# Determine environment
# Local
SetEnvIf Server_Addr ^\:\:1 WPENV=local
SetEnvIf Server_Addr ^127\.0\.0\.1 WPENV=local
SetEnvIf Host ^(www\.)?local\. WPENV=local
# Release
SetEnvIf Host ^(www\.)?dev\. WPENV=release
@noelboss
noelboss / setup.txt
Created November 26, 2013 09:58
A little trick how to replace &nbsp; within Typo3 Content (Versions lower than 4.6)
10 = TEXT
10.value = For some reasons, I don't want &nbsp;&nbsp;s in my code...
10.parseFunc {
short.nbsp = #32
}
# Results in: For some reasons, I don't want &#32;&32;s in my code...
# and since &#32; is a normal space, it collapes
@noelboss
noelboss / page_tsconfig.txt
Created November 21, 2013 14:18
How to configure gridelements for Typo3 purely with TypoScript and TSconfig and thus living in files. Based on this article: http://www.networkteam.com/blog/post/gridelements-professionell-nutzen.html
# Page TSConfig:
tx_gridelements.setup {
# ID of Element
1 {
title = Two Columns
config {
colCount = 2
rowCount = 1
rows {
1 {
@noelboss
noelboss / child-repository.php
Created November 9, 2012 08:44
How to apply default sorting for child objects of the type Tx_Extbase_Persistence_ObjectStorage
/**
*
*
* @package nboevents
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
class Tx_Nboevents_Domain_Repository_EventRepository extends Tx_Extbase_Persistence_Repository {
/**
* defaultOrderings