Skip to content

Instantly share code, notes, and snippets.

View Vivelin's full-sized avatar
🏳️‍🌈

Laura Verdoes Vivelin

🏳️‍🌈
View GitHub Profile
@Vivelin
Vivelin / Preferences.sublime-settings
Last active June 11, 2016 07:40
Sublime Text 3 - User settings
{
"auto_close_tags": false,
"auto_complete_commit_on_tab": true,
"auto_match_enabled": false,
"bold_folder_labels": true,
"caret_style": "phase",
"close_windows_when_empty": true,
"color_scheme": "Packages/User/SublimeLinter/brogrammer (SL).tmTheme",
"copy_with_empty_selection": false,
"font_face": "Input",
@Vivelin
Vivelin / prompt.sh
Created July 27, 2013 16:33
Simply colored bash prompt in CentOS
# /etc/profile.d/prompt.sh
if [ "$PS1" ]; then
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\]\H\[\033[01;34m\] \w \$\[\033[00m\] '
else
PS1='\[\033[01;32m\]\u@\H\[\033[01;34m\] \w \$\[\033[00m\] '
fi
fi
@Vivelin
Vivelin / gist:6112013
Created July 30, 2013 10:59
This is why you need Option Strict On.
Dim list As IList(Of String) = text.Split(" ")
Dim number As String = ""
For Each entry In list
If Char.IsDigit(entry) Then
number = entry
Exit For
End If
Next
If number = 1 Then
Return True
@Vivelin
Vivelin / profile.ps1
Last active May 16, 2019 07:33
Basic Powerline-inspired PowerShell prompt
# Note: requires a Powerline-patched font to display properly
# See https://github.com/powerline/fonts
$CURRENT_BG = $null
$SEGMENT_DELIMETER_GLYPH = ""
$GIT_BRANCH_GLYPH = ""
function prompt {
Write-PowerlineUserContext
Write-PowerlineLocation
Write-PowerlineGit
@Vivelin
Vivelin / ArialRoboto.user.css
Last active November 21, 2020 17:49
Arial -> Roboto
/* ==UserStyle==
@name Arial font replacement
@namespace vivelin.net
@version 1.0.4
@description Replace Arial, Helvetica and similar fonts with Roboto. Requires Roboto to be installed locally. Available from <https://github.com/google/roboto/releases>.
@author Vivelin
@updateURL https://gist.github.com/Vivelin/cd37bbcee8caa00bd8eb5383f07667d6/raw/ArialRoboto.user.css
@license unlicense
==/UserStyle== */
@Vivelin
Vivelin / CourierNewPrime.user.css
Last active November 21, 2020 17:38
Courier -> Courier Prime
/* ==UserStyle==
@name Courier font replacement
@namespace vivelin.net
@version 1.0.2
@description Replace Courier and similar fonts with Courier Prime. Requires Courier Prime to be installed locally. Available from <https://quoteunquoteapps.com/courierprime/>.
@author Vivelin
@updateURL https://gist.githubusercontent.com/Vivelin/7b73bde9d62fb99741eab4e16de38eb6/raw/CourierNewPrime.user.css
@license unlicense
==/UserStyle== */
@Vivelin
Vivelin / Configuration.cs
Created November 16, 2016 15:21
Vivelin.Environment.Configuration usage example
namespace Vivelin.Environment
{
public class Configuration
{
public Configuration() : this(new JsonConfigurationProvider())
{ }
public Configuration(IConfigurationProvider provider)
{
File = provider;
@Vivelin
Vivelin / TextWriterDbInterceptor.cs
Created April 4, 2018 13:51
An Entity Framework IDbInterceptor that suppresses execution of insert and update statements and instead writes them to a TextWriter.
using System;
using System.Data.Common;
using System.Data.Entity.Infrastructure.Interception;
using System.Data.SqlClient;
using System.IO;
/// <summary>
/// Represents an interceptor that writes insert and update statements to a
/// <see cref="TextWriter"/> instead of executing them against a database.
/// </summary>
@Vivelin
Vivelin / DuplicatePropertySchemaFilter.cs
Created August 30, 2018 10:57
A Swagger `ISchemaFilter` that removes duplicate properties in `allOf` schemas
/// <summary>
/// Represents a Swagger filter that removes duplicate properties in 'allOf'
/// schema definitions.
/// </summary>
public class DuplicatePropertySchemaFilter : ISchemaFilter
{
private const string DefinitionsRefPrefix = "#/definitions/";
/// <summary>
/// Removes duplicate properties from the specified schema.
@Vivelin
Vivelin / TrelloTextLabelTweaks.user.css
Last active May 12, 2020 16:28
Trello text label tweaks
/* ==UserStyle==
@name Trello text label tweaks
@namespace vivelin.net
@version 1.0.5
@description Minor personal tweaks to Trello labels in text mode.
@author Vivelin
@updateURL https://gist.githubusercontent.com/Vivelin/07610abd03c47290442a71beb905160a/raw/TrelloTextLabelTweaks.user.css
@license unlicense
==/UserStyle== */
@-moz-document domain("trello.com") {