Skip to content

Instantly share code, notes, and snippets.

View keks55's full-sized avatar

keks55

View GitHub Profile
@keks55
keks55 / customizer.php
Created October 9, 2017 15:09
Customize wordpress example
function q_customize_register( $wp_customize ){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('q Shortcodes', 'themename'),
'description' => '',
'priority' => 100,
));
$wp_customize->add_setting('themename_theme_options[link_color]', array(
@keks55
keks55 / enqueue.php
Created October 3, 2017 08:56
Wordpress enqueue scripts
// Theme constants paths
define( 'TD', get_template_directory() );
define( 'INC', TD . '/inc' );
define( 'LANGS', TD . '/languages' );
define( 'TD_URI', get_template_directory_uri() );
define( 'JS', TD_URI . '/js' );
define( 'CSS', TD_URI . '/css' );
define( 'WIDGETS', INC . '/widgets' );
// Theme scripts
@keks55
keks55 / session.php
Created September 24, 2017 13:55
Session for Wordpress plugin
// session value
function keksus_ae_session(){
global $option_name,$options;
if( $options['captcha_on'] == '1' ){
session_start();
if(headers_sent()){
$digits = $options['captcha_digits'];
$_SESSION['captcha'] = rand(pow(10, $digits-1), pow(10, $digits)-1);
$captcha = $_SESSION['captcha'];
return $captcha;
@keks55
keks55 / default.tint2rc
Created September 17, 2017 08:55
Tint2 - default
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 7
border_width = 2
background_color = #000000 60
border_color = #FFFFFF 16
@keks55
keks55 / tint2confrc
Created September 17, 2017 08:50
Tint2 - confrc
#---------------------------------------------
# TINT2CONF CONFIG FILE
default_theme = /root/.config/tint2/default.tint2rc
cmd_property = /usr/bin/env python /usr/bin/tintwizard.py
width = 500
height = 350
@keks55
keks55 / tint2rc
Created September 17, 2017 08:49
Tint2 - tint2rc
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 7
border_width = 2
background_color = #000000 60
border_color = #FFFFFF 16
@keks55
keks55 / autostart
Created September 17, 2017 08:43
Openbox autostart
#
# When rebooting, restore the image to the desktop background
eval `cat $HOME/.fehbg` &
tint2 &
@keks55
keks55 / rc.xml
Created September 17, 2017 08:41
Openbox rc.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
@keks55
keks55 / menu.xml
Created September 17, 2017 08:40
Openbox menu.xml
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
<menu id="root-menu" label="Openbox 3">
<item label="Terminal emulator">
<action name="Execute">
<execute>x-terminal-emulator</execute>
</action>
</item>
<item label="Web browser">
<action name="Execute">
@keks55
keks55 / ajax-message.txt
Last active September 15, 2017 04:39
WP- Ajax Message
<?php
/*
Plugin Name: Ajax message
Plugin URI: http://keksus.com/wordpress-plugins/ae.html
Description: Send message to email with ajax form
Version: 0.0.1
Author: Keksus
Author URI: http://keksus.com/
Text Domain: ae
Domain Path: /languages/