Skip to content

Instantly share code, notes, and snippets.

Avatar

noelboss noelboss

View GitHub Profile
@noelboss
noelboss / RangeDownloadBoss.module.php
Last active Jun 21, 2018
Range Download – Usage: wire('modules')->get('ProcessPageView')->sendFile($page, $filename);
View RangeDownloadBoss.module.php
<?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
*/
View 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 Nov 8, 2017
Füge einen Adventskalender zu Deiner Seite hinzu
View ICF Advents Kalender
[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 Oct 12, 2017
Export WooCommerce Shop Customers…
View woocommerce-shop-customer-export.sql
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 Jan 15, 2021
Simple automated GIT Deployment using Hooks
View git-deployment.md

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 Jun 21, 2016
Laravel Project initialization…
View log.md

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
Serve files from server when not available on your local machine
View .htaccess
# 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 Nov 26, 2013
A little trick how to replace &nbsp; within Typo3 Content (Versions lower than 4.6)
View setup.txt
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 Nov 21, 2013
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
View page_tsconfig.txt
# 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 Nov 9, 2012
How to apply default sorting for child objects of the type Tx_Extbase_Persistence_ObjectStorage
View child-repository.php
/**
*
*
* @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
You can’t perform that action at this time.