This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// [gist url="https://gist.github.com/Ugotsta/49d45a54022f00060f71"] | |
function gist_function( $atts ) { | |
$a = shortcode_atts( array( | |
'url' => 'https://gist.github.com/Ugotsta/49d45a54022f00060f71' | |
), $atts ); | |
return '<script src="' . esc_attr($a['url']) . '.js"></script>'; | |
} | |
add_shortcode( 'gist', 'gist_function' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// [unrendered shortcode="shortcode"] | |
function unrendered_function( $atts ) { | |
$a = shortcode_atts( array( | |
'shortcode' => 'shortcode' | |
), $atts ); | |
return '[' . esc_attr($a['shortcode']) . ']'; | |
} | |
add_shortcode( 'unrendered', 'unrendered_function' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//[phpinfo] | |
function phpinfo_shortcode( $atts ){ | |
return phpinfo(); | |
} | |
add_shortcode( 'phpinfo', 'phpinfo_shortcode' ); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// displays an Appointments+ scheduling form using the logged in user's id as the worker id | |
// [app_schedule_logged_in_user] | |
function app_schedule_logged_in_user_shortcode( $atts ) { | |
$user_id = get_current_user_id(); | |
if ($user_id == 0) { | |
return 'You are currently not logged in.'; | |
} else { | |
return do_shortcode( '[app_schedule worker="' . $user_id . '"]' ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('body_class', 'membership_body_class'); | |
function membership_body_class($classes) { | |
if ( is_user_logged_in() ) { | |
$member = new Membership_Model_Member( get_current_user_id() ); | |
if( $member->is_member() ) { | |
$classes[] = 'm-is-member'; | |
$level_array = $member->get_level_ids(); | |
$levels = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: CoursePress Instructor Notifications | |
* Plugin URI: http://premium.wpmudev.org/forums/topic/is-coursepress-pro-able-to-send-notifications-to-teachers-about-enrollmentassignments#post-774620 | |
* Description: Send email notices to instructors when a studen enrolls in a course | |
* Version: 1.0.0 | |
* Author: Hoang (Incsub) | |
* Author URI: http://premium.wpmudev.org/ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-add-repository ppa:bugs-launchpad-net-falkensweb/cool-retro-term | |
sudo apt-get update | |
sudo apt-get install cool-retro-term |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install dependencies | |
sudo apt-get install libqt4-dev qt4-dev-tools libxaw7-dev libasound2-dev libjack-jackd2-dev libsamplerate-dev liblrdf-dev libsndfile-dev ladspa-sdk libglib2.0-dev calf-plugins binutils-dev libc6-dev tk8.5 libogg-dev libvorbis-dev libspeex-dev fftw-dev fftw3-dev libxkbfile-dev cmake clang libfreetype6-dev libxinerama-dev libxcursor-dev libiberty-dev guile-2.0 xutils-dev | |
# if python 2 is not already installed, uncomment the next 3 lines: | |
#sudo add-apt-repository ppa:fkrull/deadsnakes | |
#sudo apt-get update | |
#sudo apt-get install python2.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p ~/.config/QtProject/qtcreator/styles/ | |
cd ~/.config/QtProject/qtcreator/styles/ | |
wget https://raw.githubusercontent.com/procedural/qtcreator-themes/master/twilight.xml https://raw.githubusercontent.com/procedural/qtcreator-themes/master/monokai.xml https://raw.githubusercontent.com/procedural/qtcreator-themes/master/dusk.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<COLOUR_SCHEME font="Droid Sans Mono; 14.0 "> | |
<COLOUR name="Main Window Bkgd" colour="FF181818"/> | |
<COLOUR name="Treeview Highlight" colour="FF43463F"/> | |
<COLOUR name="Code Background" colour="FF181818"/> | |
<COLOUR name="Line Number Bkgd" colour="0FAAAAAA"/> | |
<COLOUR name="Line Numbers" colour="84AAAAAA"/> | |
<COLOUR name="Plain Text" colour="FFAAAAAA"/> | |
<COLOUR name="Selected Text Bkgd" colour="FF43463F"/> |