Skip to content

Instantly share code, notes, and snippets.

View vctls's full-sized avatar

Victor Toulouse vctls

  • Brussels, Belgium
View GitHub Profile
@vctls
vctls / dt_column_filters.js
Created May 25, 2018 09:06
Datatables | dynamically created individual column filters
/*===========================*/
/* Individual column filters */
/*===========================*/
var $t = $('#datatable');
var $dt = $t.DataTable();
var $thead = $t.find('thead');
var $tr = $("<tr role='row'></tr>").appendTo($thead);
var $visiCols = $dt.columns(':visible');
// Add headers.
@vctls
vctls / dt_show_hide_columns.js
Created May 25, 2018 09:10
Datatables | dynamically generated column show/hide buttons
var $t = $('#datatable');
var $dt = $t.DataTable();
/*===================*/
/* Show/hide buttons */
/*===================*/
var $toolbar = $("<div class='toolbar'></div>");
$dt.columns().every(function () {
var that = this;
console.log(that.header().innerHTML);
@vctls
vctls / wide-jenkins.js
Created September 3, 2018 07:42
Display Jenkins pipeline options and script editor in full width.
// ==UserScript==
// @name Wide Jenkins
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Display pipeline options in wide screen.
// @author Victor Toulouse
// @match http://jenkins-ci.org
// @grant none
// ==/UserScript==
@vctls
vctls / web.openrainbow.com.user.css
Last active May 14, 2020 09:38
Make Alcatel-Lucent's Rainbow web app use the full width and dark colors.
/* ==UserStyle==
@name Alcatel-Lucent Rainbow, wide and dark
@namespace github.com/openstyles/stylus
@version 0.1.5
@description Make Alcatel-Lucent's Rainbow web app use the full width and dark colors.
@author vctls
==/UserStyle== */
@-moz-document domain("web.openrainbow.com") {
/* Make the main container use the window full width. */
.mainArea {
@vctls
vctls / symfony.com.user.css
Last active July 8, 2021 13:35
Symfony doc, wide layout, no distractions.
/* ==UserStyle==
@name symfony.com - 25/05/2020 à 15:29:45
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document url-prefix("https://symfony.com/doc/") {
.container {
max-width: 100% !important;

Keybase proof

I hereby claim:

  • I am vctls on github.
  • I am vctls (https://keybase.io/vctls) on keybase.
  • I have a public key ASAK4EAZSny4yzL8kgeCdHsEF9aNAijAWf6E1M-BJ0vx4Ao

To claim this, I am signing this object:

@vctls
vctls / bottom_aligned_divs_inverted_wrapping.html
Last active December 14, 2020 09:39
Bottom aligned divs, with the right one wrapping above the left one while sticking to bottom right.
<body>
<html lang="en">
<style type="text/css">
.container {
height: 300px;
background: darkgrey;
resize: both;
overflow: auto;
display: flex;
flex-wrap: wrap-reverse; /* Wraps from bottom right to top left. */
@vctls
vctls / element_voice_messages.js
Last active September 21, 2021 17:45
Adds a button next to the composer field to record voice messages.
// ==UserScript==
// @name Element Voice Messages
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds a button to record voice messages. Click the button to start recording, click again to stop.
// @author vctls
// @match https://app.element.io/
// @grant none
// ==/UserScript==
@vctls
vctls / url_scam_detection.js
Created June 25, 2021 10:05
User script that warns if the text of a clicked link looks like a domain that does not match the href attribute.
// ==UserScript==
// @name URL Scam Detection
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Warns if the text of a clicked link looks like a domain that does not match the href attribute.
// @author vctls
// @match *
// @grant none
// ==/UserScript==
@vctls
vctls / somewhat_secure_eval.php
Last active November 18, 2022 12:27
Slightly more ““secure”” parsing of php values through eval()
<?php
$phpString = '$values = ["test"];';
$code = <<<PHP
<?php
\$values = [];
\$string = <<<'STRING'
$phpString
STRING;
eval(\$string);
echo serialize([\$values]);