Skip to content

Instantly share code, notes, and snippets.

View X-Raym's full-sized avatar

Raymond Radet X-Raym

View GitHub Profile
@X-Raym
X-Raym / styles.less
Created July 21, 2016 13:06
Better HTML syntax color for Atom
// Tags
atom-text-editor::shadow .tag.html,
atom-text-editor::shadow .begin.html, atom-text-editor::shadow .end.html {
color: #e06c75;
}
// Inside Tags
atom-text-editor::shadow .meta.tag.any.html,
atom-text-editor::shadow .string.begin.html,
atom-text-editor::shadow .string.end.html {
@X-Raym
X-Raym / Parallelipedic Hole.lua
Created August 19, 2016 18:51
ComputerCraft Edu Scripts
SURFACE
CODE
-- Trous X Y Z for ComputerCraft 1.74 / Minecraft 1.7.10
-- X-Raym, Friops, Hengry
-- 2015-08-25
-- A script to dig a parallepipedic hole x y z.
-- CUSTOMIZATION
longueur = 4
largeur = 6
arts = {'Accent','Staccato','Tenuto','Staccatissimo','Marcato','Fermata'}
index = 10
for i, art in ipairs( arts ) do
output = 'slider' .. index .. ':0<0,2,1{None,CC,Note}>' .. art .. ' Output'
print (output)
index = index + 1
@X-Raym
X-Raym / REAPER actions list template.html
Last active October 15, 2016 14:52
A better export action list template. Still minimal but already more practical. Pure valid semantic HTML 5.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>REAPER actions list</title>
</head>
<body>
@X-Raym
X-Raym / get_page_type.php
Created October 16, 2016 17:45
Get WordPress Page Type
<?php
// http://wordpress.stackexchange.com/questions/83887/return-current-page-type
function get_page_type() {
global $wp_query;
$loop = 'notfound';
if ( $wp_query->is_page ) {
$loop = is_front_page() ? 'front' : 'page';
} elseif ( $wp_query->is_home ) {
@X-Raym
X-Raym / Generate lots of wordpres audio shortcode.lua
Last active October 21, 2016 13:07
Generate lots of wordpres audio shortcodes
array = {
'https://ia802707.us.archive.org/13/items/SouthernTierRadioTheatreProgram9/strt9_64kb.mp3',
'https://archive.org/download/Caruso_part1/Caruso-AddioAllaMadre.mp3',
'https://archive.org/download/Caruso_part1/Caruso-AddioDolceSvegliareAllaMattinawFarrarCiaparelliScotti.mp3',
'https://archive.org/download/Caruso_part1/Caruso-AdorablesTourments.mp3',
'https://archive.org/download/Caruso_part1/Caruso-CantiqueDeNoel.mp3',
'https://archive.org/download/Caruso_part1/Caruso-CelesteAida_2.mp3',
'https://archive.org/download/Caruso_part1/Caruso-CujusAnimann.mp3',
'https://archive.org/download/Caruso_part1/Caruso-DelTempioAlLimitarwMarioAncona.mp3',
'https://archive.org/download/Caruso_part1/Caruso-DellanatalsuaterrailpadreOtucheinsenoaglangeli.mp3',
@X-Raym
X-Raym / waveSurfer-wp-filters-exemples.php
Last active January 24, 2017 20:42
WaveSurfer-WP filters exemples. Required v2.6.
<?php
/**
* Plugin Name: WaveSurfer-WP Custom Functions
* Description: Custom functions for WaveSurfer-WP
*/
//------------------------------- CONDITIONAL SHORTCODE ATTRIBUTES -------------------------------------
// Add shortcode attributes
@X-Raym
X-Raym / Delete learndash user infos after a certain date.php
Created October 29, 2016 14:25
Delete learndash user infos after a certain date
<?php
define( 'WP_USE_THEMES', false );
require( 'wp-blog-header.php' );
$usermeta = get_user_meta( 354, '_sfwd-quizzes', true );
$new = array();
foreach ($usermeta as $key => $value) {
if ( $value['time'] < 1476545002 )
array_push($new, $value);
@X-Raym
X-Raym / learndash blocked user.sql
Created October 29, 2016 14:30
Get learndash blocked users
1."Je veux les lignes pour lequel le quiz_id est égal à 191" :
SELECT *
FROM wp_wp_pro_quiz_lock
WHERE quiz_id = 191
2. "Je veux supprimer la ligne pour lequel le quiz est egal à 91 et l'user_id à 384" :
DELETE
@X-Raym
X-Raym / upw-edd.php
Created November 4, 2016 12:59
Ultimate Post Widget for Easy Digital Downloads
<?php
/*
Plugin Name: Ultimate Post Widget for Easy Digital Downloads
*/
// NOTE: WOrk in progress
add_filter('upw_wp_query_args', 'upw_only_posts_with_same_edd_category', 10 , 2);
function upw_only_posts_with_same_edd_category($args, $instance) {