Skip to content

Instantly share code, notes, and snippets.

View X-Raym's full-sized avatar

Raymond Radet X-Raym

View GitHub Profile
<!-->pProQuiz_View_StatisticsAjax.php
At line 39, replace
<a href="#" class="user_statistic" data-ref_id="<?php echo $model->getStatisticRefId(); ?>"><?php echo $model->getUserName(); ?></a></code>
by-->
<a href="#" class="user_statistic" data-ref_id="<?php echo $model->getStatisticRefId(); ?>">
<?php
$user_id = $model->getUserId();
$user_info = get_userdata($user_id);
$username = $user_info->user_login;
$first_name = $user_info->first_name;
@X-Raym
X-Raym / wordpress-popular-post-admin-columns.php
Last active November 20, 2015 16:52
Add Total Views column on Admin list posts pages
<?php
/**
* Add Total Views column on Admin list posts pages
*/
add_action( 'admin_init', 'hook_wpp_views_posts_column', 10 );
function hook_wpp_views_posts_column() {
$post_types = get_post_types( array( 'public' => true ) );
@X-Raym
X-Raym / atom highlight character.less
Last active November 22, 2015 18:55
atom matches bracket highlight character
// From https://discuss.atom.io/t/where-to-set-the-matched-brace-color/12372/17
// by smlombardi
// Puth this in default Less stylesheet
atom-text-editor::shadow .bracket-matcher .region {
border: 1px solid rgba(222, 149, 54, 0.6);
border-radius: 3px;
background-color: rgba(255, 217, 0, 0.3);
z-index: 100;
}
NOTEPAD QUICK FIND REPLACE BEFORE AND AFTER AT END OF LINE
(.+)$
@X-Raym
X-Raym / horizontal_wiimote_to_vJoy.py
Last active March 1, 2016 22:12 — forked from AVapps/horizontal_wiimote_to_vJoy.py
FreePIE script to use up tu 4 wiimotes and nunchucks with vJoy. Configure your virtual joysticks with x and y axis, 1 "4 directions" POV and 9 buttons.
"""
Horizontal Wiimote to vJoy FreePIE script
Maps up to 4 wiimotes to 4 virtual joysticks using vJoy.
Before running this script define 4 virtual joysticks with x and y axis, 13 buttons (or keep your wiimote + nunchuck virtual joysticks configuration).
version: 1.1
author: Jahdrien
mod: X-Raym
gist: https://gist.github.com/X-Raym/caada7ebc4b76fb01dcd
@X-Raym
X-Raym / Ninja Form - Contact
Created March 2, 2016 03:13
Template for WordPress Ninja Form Plugin, for a simple contact form.
a:4:{s:4:"data";a:13:{s:12:"date_updated";s:19:"2016-02-10 14:31:38";s:14:"clear_complete";s:1:"1";s:13:"hide_complete";s:1:"1";s:10:"show_title";s:1:"0";s:6:"status";s:0:"";s:10:"form_title";s:7:"Contact";s:11:"append_page";s:0:"";s:4:"ajax";s:1:"1";s:9:"logged_in";s:1:"0";s:17:"not_logged_in_msg";s:0:"";s:16:"sub_limit_number";s:0:"";s:13:"sub_limit_msg";s:0:"";s:8:"last_sub";s:1:"1";}s:2:"id";N;s:5:"field";a:9:{i:0;a:7:{s:2:"id";s:2:"12";s:7:"form_id";s:1:"6";s:4:"type";s:11:"g_recaptcha";s:5:"order";s:1:"0";s:4:"data";a:7:{s:5:"label";s:9:"Anti-Spam";s:15:"input_limit_msg";s:17:"character(s) left";s:3:"req";s:1:"1";s:9:"label_pos";s:5:"above";s:9:"show_desc";s:1:"0";s:8:"desc_pos";s:11:"after_label";s:9:"desc_text";s:23:"Click on the box below.";}s:6:"fav_id";N;s:6:"def_id";N;}i:1;a:7:{s:2:"id";s:2:"18";s:7:"form_id";s:1:"6";s:4:"type";s:7:"_hidden";s:5:"order";s:1:"0";s:4:"data";a:13:{s:5:"label";s:9:"User Name";s:15:"input_limit_msg";s:17:"character(s) left";s:18:"default_value_type";s:18:"_user_display
@X-Raym
X-Raym / lookahead camera
Last active March 9, 2016 12:43
Construct 2
// by jerementor
// https://www.youtube.com/watch?v=e9Qh4_zsSCo
// First create an empty object called obj_camera
// Then, if event sheet :
Global number cameraSpeed = 0.08
Global number lookAhead = 30
Global number cameraHeight = 10
@X-Raym
X-Raym / hearthis.at oembed.txt
Created March 12, 2016 02:23
hearthis.at omebed
From https://twitter.com/hearthisat/status/685001842246443008
http://hearthis.at/oembed/?url=https://hearthis.at/krissdek/kriss-dek-good-day-original-mix/&format=xml
@X-Raym
X-Raym / omebed-gist
Created March 16, 2016 02:05
Oembed Gist
If specific file and space in file name
https://gist.github.com/X-Raym/f515430e8117e6a87d6f#file-ReaScript%20Lesson%2009%20-%20Preventing%20bugs.lua
spaces : %20
prefix : #file-
extension : file-name.extension
@X-Raym
X-Raym / Multiline text to array.php
Created April 28, 2016 12:26
Multiline text to array
<?php
$text_array = preg_split( "/\r?\n/", $multiline_text ); // Multilines to array