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 / gitlab_better_CI_log.user.css
Last active January 31, 2023 16:49
Makes Gitlab CI job log follow light theme preference, and removes ugly and unnecessary spacing.
/* ==UserStyle==
@name Slightly more readable Gitlab CI job log
@namespace github.com/openstyles/stylus
@version 0.3
@description Enforces light color scheme preference, and reduces spacing between log lines.
@author vctls
@homepageURL https://gist.github.com/vctls/fee75998f5c4671be0e531b0731d7c73/edit
@downloadURL https://gist.github.com/vctls/fee75998f5c4671be0e531b0731d7c73/raw
@updateURL https://gist.github.com/vctls/fee75998f5c4671be0e531b0731d7c73/raw
==/UserStyle== */
@vctls
vctls / openproject-standard-edit.user.js
Last active February 8, 2023 15:48
OpenProject : replace inline editing on click by a standard edit button.
// ==UserScript==
// @name OpenProject Standard Edit
// @namespace http://tampermonkey.net/
// @version 0.9
// @downloadURL https://gist.github.com/vctls/ee8c77a1ec712984e85b247cbf9f6459/raw
// @updateURL https://gist.github.com/vctls/ee8c77a1ec712984e85b247cbf9f6459/raw
// @description Replace inline editing on click in OpenProject by a standard edit button.
// @author vctls
// @match https://*.openproject.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=openproject.com
@vctls
vctls / phpstorm_watcher.xml
Created November 30, 2022 13:03
Example of PhpStorm file watcher for WSL
<TaskOptions>
<TaskOptions>
<option name="arguments" value="options $/FileRelativePath$" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" />
<option name="exitCodeBehavior" value="ALWAYS" />
<option name="fileExtension" value="php" />
<option name="immediateSync" value="false" />
<option name="name" value="My WSL file watcher" />
<option name="output" value="$/FileRelativePath$" />
@vctls
vctls / theme_switch.ps1
Created November 20, 2022 12:31
Powershell script to switch both app and system Windows light/dark theme
# Switch Windows light/dark theme
$regkey = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
$appProp = "AppsUseLightTheme"
$sysProp = "SystemUsesLightTheme"
$currVal = Get-ItemProperty -Path $regKey -Name $appProp | Select-Object -exp $appProp
$newVal = !$currVal + 0;
Set-ItemProperty -Path $regKey -Name $appProp -Value $newVal -Type Dword -Force;
Set-ItemProperty -Path $regKey -Name $sysProp -Value $newVal -Type Dword -Force;
@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]);
@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 / 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 / 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. */

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 / 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;