Skip to content

Instantly share code, notes, and snippets.

View jasperf's full-sized avatar
🏠
Working from home

Jasper Frumau jasperf

🏠
Working from home
View GitHub Profile
@jasperf
jasperf / gist:2633984
Last active October 4, 2015 12:17
Joomla 1.5 Bash command Make all needed directories writable -- Server with faulty rights setup #joomla #chmod
chmod 777 administrator/backups/ administrator/language/ administrator/components/ administrator/language/en-GB/ administrator/modules/ administrator/templates/ components/ images/ images/banners/ images/stories/ language/ language/en-GB/ language/en-GB/ language/pdf_fonts/ media/ modules/ plugins/ plugins/content/ plugins/editors/ plugins/editors-xtd/ plugins/search/ plugins/system/ plugins/user/ plugins/xmlrpc/ templates/ /opt/local/www/joomla15/cache/ /opt/local/www/joomla15/administrator/cache/ /opt/local/www/joomla15/logs/ /opt/local/www/joomla15/tmp/
@jasperf
jasperf / api_w3cvalidation.class
Created May 9, 2012 08:37
W3.org XHTML Validator PHP Class - Jamie Telin #validator #api #PHP
<?
/*
Author: Jamie Telin (jamie.telin@gmail.com), currently at employed Zebramedia.se
Scriptname: W3C Validation Api v1.0 (W3C Markup Validation Service)
Use:
//Create new object
$validate = new W3cValidateApi;
@jasperf
jasperf / ruby+macports+mysql
Last active October 4, 2015 16:17
Ruby on MacPorts with MySQL #ruby #mysql #macports
sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock // to make rails find mysql.sock http://paulsturgess.co.uk/articles/46-using-macportsdarwinports-to-install-ruby-on-rails-mysql-subversion-capistrano-and-mongrel-on-mac-os-x
database.yml
Development:
adapter: mysql2
encoding: utf8
database: blog_development
pool: 5
username: root
@jasperf
jasperf / mysl2ror.rb
Created May 12, 2012 14:17
MySQL2 Error on Ruby on Rails
To avoid: RuntimeError (Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record/connection_adapters/mysql2_adapter)):
in Gemfile gem 'mysql2', '< 0.3'
bundle update
@jasperf
jasperf / .gitignore
Created May 24, 2012 08:01 — forked from redoPop/.gitignore
Template .gitignore file for WordPress projects #wordpress #git
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@jasperf
jasperf / wp-accompany-wdget
Last active October 7, 2015 04:58
WP Accompany Widget #wordpress #widget
<?php
/*
Plugin Name: Accompany Text Widget
Plugin URI: http://imagewize.com/
Description: Accompany Post Widget grabs a Accompany post and the associated thumbnail to display on your sidebar based on egetway.com 's development
Author: Jasper Frumau
Version: 2
Author URI: http://jasperfrumau.com/
*/
@jasperf
jasperf / gist:3109949
Last active October 7, 2015 05:07
Nivo Slider in WordPress met WP_Query #wordpress #slider #wp-query
<div id="slider-wrapper">
<div class="slider-wrapper theme-default">
<div class="ribbon"></div>
<div id="slider" class="nivoSlider">
<?php $pj_slider = new WP_Query('post_type=img_slideshow&showposts=4'); while($pj_slider->have_posts()) : $pj_slider->the_post(); ?>
<?php $pj_slider_caption = '#slider-caption-'.get_the_ID(); ?>
<?php if(has_post_thumbnail() ) { ?>
@jasperf
jasperf / gist:3109978
Last active October 7, 2015 05:07
Nivo Scripts Loader WordPress #wordpress #slider
<!-- Include the Nivo Slider JS file -->
<script src="<?php bloginfo("template_url"); ?>/scripts/nivoslider/jquery.nivo.slider.pack.js" type="text/javascript"></script>
<!-- Set up the Nivo Slider -->
<script type="text/javascript">
jQuery(window).load(function() {
jQuery('#slider').nivoSlider({
effect: 'fade', // Specify sets like: 'fold,fade,sliceDown,slideInRight,sliceUpLeft'
animSpeed: 500, // Slide transition speed
pauseTime: 6000, // How long each slide will show
});
@jasperf
jasperf / wp-custom-post-type
Last active October 7, 2015 05:07
Custom Post Type Slides #wordpress #cpt
/*----------------------------------------
Slider Custom Post Type
---------------------------------------------*/
add_action( 'init', 'create_slider' );
function create_slider() {
register_post_type( 'img_slideshow',
array(
'labels' => array(
'name' => __( 'Slides' ),
@jasperf
jasperf / author-widget-v2
Created July 20, 2012 06:50
Author Widget Based on Thomas Scholz's Author Widget
<?php # -*- coding: utf-8 -*-
declare ( encoding = 'UTF-8' );
/**
* Plugin Name: T5 Author Data
* Plugin URI: http://wordpress.stackexchange.com/q/47418/73
* Description: Simple Widget to display author data on singular pages (posts and pages) and author archives.
* Version: 2012.03.31
* Author: Thomas Scholz <info@toscho.de> and Jasper Frumau <jasper@imagewize.com>
* Author URI: http://toscho.de and http://imagewize.com
* License: MIT