Skip to content

Instantly share code, notes, and snippets.

View chrillep's full-sized avatar
🆗
200

Christian Widlund chrillep

🆗
200
View GitHub Profile
@chrillep
chrillep / FeedServiceProvider.php
Created September 24, 2024 08:00
FeedServiceProvider for custom xml and json feed (acorn, wordpress, laravel)
<?php
declare(strict_types=1);
namespace App\Providers;
use DOMDocument;
use Illuminate\Support\ServiceProvider;
class FeedServiceProvider extends ServiceProvider
@chrillep
chrillep / load-test.md
Last active May 28, 2022 20:23
load tests
### Keybase proof
I hereby claim:
* I am chrillep on github.
* I am chrillep (https://keybase.io/chrillep) on keybase.
* I have a public key ASAQYOKsHewG37qDpS2LXhwkdjKQkuqH6F1BGX4RxBHjCAo
To claim this, I am signing this object:
{
"bokformat": [
{
"namn": "Vulkan Minipocket",
"bredd": 90,
"hojd": 150,
"value": 0.82
},
{
"namn": "A6",
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@chrillep
chrillep / functions.php
Last active August 29, 2015 14:08
Twitter bootstrap WP-e-Commerce Pagination Filter
function bootstrap_custom_wpsc_pagination($output){
$output = '<nav><ul class="pagination">' . $output;
$output = str_replace(
array( '<a', '</a>',"<span class='current'>", '</span>', __('Pages: ','wpsc')),
array( '<li><a', '</a></li>','<li class="current active"><a href="#">', '<span class="sr-only">(current)</span></a></li>', '<li class="disabled"><span>' . __('Pages: ','wpsc') . '</span></li>'),
$output);
$output = $output . '</ul></nav>';
return $output;
}
add_filter( 'wpsc_pagination', 'bootstrap_custom_wpsc_pagination' );
@chrillep
chrillep / tw-wp-post-tags.php
Last active August 29, 2015 14:02 — forked from paulc010/tw-wp-post-tags.php
Font-awsome icons if post has feed tag and "social media" tag
<footer>
<?php
if (get_the_tags()) $posttags = get_the_tags();
if ($posttags) {
$tagging = '';
foreach($posttags as $tag) {
if ($tag->slug != 'feed') {
$tagging = $tagging . '<i class="fa fa-'.$tag->slug.'-square"></i>';
}
}