Skip to content

Instantly share code, notes, and snippets.

Kilian sofasurfer

Block or report user

Report or block sofasurfer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sofasurfer
sofasurfer / twitter.php
Created Nov 6, 2019
Twitter Feed Class
View twitter.php
<?php
/*
Retrieves twitter feed
*/
class SocialFeed {
@sofasurfer
sofasurfer / conf.php
Created Aug 24, 2018
WP Disable Updates
View conf.php
<?php
/**
* Disable the Plugin and Theme Editor.
*
* Occasionally you may wish to disable the plugin or theme editor to prevent overzealous users from being able to edit
* sensitive files and potentially crash the site. Disabling these also provides an additional layer of security if a hacker
* gains access to a well-privileged user account.
*
* @see https://codex.wordpress.org/Editing_wp-config.php#Disable_the_Plugin_and_Theme_Editor
*/
View MODX SocialFeed
<?php
/*
General settings
*/
define('FEED_CACHE_TIME', $modx->getOption('socialfeed.cachetime'));
define('FEED_CACHE_PATH', $modx->getOption('socialfeed.cachepath'));
/*
Instagram settings
*/
View SVG Css
<html>
<header>
<style>
.logo svg path{
fill: aqua!important;
}
</style>
</header>
<bod>
View nginx_redmine_host_file
# NGINX Redmine Virtual Host Config
# @sofasurfer.org
server {
listen 80;
server_name *.myredmine.com;
location / {
proxy_pass http://127.0.0.1:3000;
}
}
@sofasurfer
sofasurfer / nginx_wp_host_file
Created Feb 11, 2012
NGINX WordPress Host File
View nginx_wp_host_file
# NGINX WordPress Virtual Host Config
# @sofasurfer.org
server {
listen 80;
server_name *.mywordpress.com;
root /var/www/mywordpress/;
index index.php;
client_max_body_size 30M;
View nginx_modx_host_file
# MODX Redmine Virtual Host Config
# @sofasurfer.org
server {
listen 80;
server_name *.mymodx.com *.amazonaws.com;
root /var/www/mymodx;
index index.php;
client_max_body_size 30M;
@sofasurfer
sofasurfer / modx-formlog.php
Created Jan 28, 2012
MODX FormLog hook to store formIt data in a jSon log file
View modx-formlog.php
<?php
/**
* MODX FormLog hook to store formIt data in a jSon log file
*
* @author Kilian Bohnenblust (sofasurfer.org)
* @example [[!FormIt?
* &hooks=`spam,formlog,email,redirect`
* &logfile=`[[++base_path]]assets/data/form-contact.log`
*
*/
@sofasurfer
sofasurfer / comments.php
Created Jan 26, 2012
Simple jSon PHP comments
View comments.php
<?php
/*
* comments.php
*
* Copyright 2012 kib <kib@sofasurfer.org>
*
*
*
*/
You can’t perform that action at this time.