Skip to content

Instantly share code, notes, and snippets.

go.ugotsta.com Ugotsta

Block or report user

Report or block Ugotsta

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
@Ugotsta
Ugotsta / melt-seamless-looper.au3
Last active Aug 29, 2015
AutoIt3 script to seamlessly loop videos using MLT. Just select all the videos you want to loop, it'll take care of the rest. You'll need MLT, which is included with many open-source video editors like Shotcut. So you can install Shotcut and the script will find the .exe file as long as it's in the default location.
View melt-seamless-looper.au3
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.12.0
Author: Kawika (Ugotsta)
Script Function:
Loops files seamlessy using MLT framework
MLT is installed with free software like Shotcut,
installing Shotcut is the easiest way to use it.
@Ugotsta
Ugotsta / auto-record-winamp.au3
Last active Aug 29, 2015
AutoIt3 script to record individual Winamp presets as separate videos.
View auto-record-winamp.au3
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.12.0
Author: Kawika (Ugotsta)
Script Function:
Automates recording of Winamp visualizations
#ce ----------------------------------------------------------------------------
@Ugotsta
Ugotsta / chat-template.php
Created Jul 21, 2014
Very simple, relatively empty page template for use with WPMU DEV Chat plugin to facilitate chats in popup window.
View chat-template.php
<?php
/**
Template Name: Chat Template
*/
?>
<html>
<head>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<style type="text/css">
@Ugotsta
Ugotsta / wp-gist-shortcode.php
Last active Aug 29, 2015
Very simple shortcode to easily add gists in WordPress using the url for reference. All it does is wrap the specified url with the script tags needed.
View wp-gist-shortcode.php
<?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' );
@Ugotsta
Ugotsta / wp-unrendered.php
Last active Aug 29, 2015
Shortcode to easily display unrendered shortcodes in WordPress content. It just wraps the specified shortcode parameter with the shortcode tags like [shortcode].
View wp-unrendered.php
<?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' );
@Ugotsta
Ugotsta / phpinfo-shortcode.php
Created Oct 21, 2014
Dead simple, a shortcode for displaying phpinfo() through the front-end. Silly but something I like. :)
View phpinfo-shortcode.php
<?php
//[phpinfo]
function phpinfo_shortcode( $atts ){
return phpinfo();
}
add_shortcode( 'phpinfo', 'phpinfo_shortcode' );
?>
@Ugotsta
Ugotsta / app_schedule_logged_in_user.php
Created Dec 11, 2014
Shortcode for use with WPMU DEV Appointments+ to show scheduling form with the logged in user's id as the service provider
View app_schedule_logged_in_user.php
// 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 . '"]' );
}
}
@Ugotsta
Ugotsta / membership-body-class.php
Created Jan 27, 2015
Add body class for WPMU DEV Membership access levels
View membership-body-class.php
<?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();
@Ugotsta
Ugotsta / cp-instructor-notifications.php
Created Mar 17, 2015
CoursePress Instructor Notifications - to email instructors when students enroll in a course
View cp-instructor-notifications.php
<?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/
*/
@Ugotsta
Ugotsta / install_cool_retro_term.sh
Last active Aug 29, 2015
Quick script to install Cool Retro Term on Ubuntu 14.x or derivates. More about Cool Retro Term at https://github.com/Swordfish90/cool-retro-term
View install_cool_retro_term.sh
#!/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
You can’t perform that action at this time.