Skip to content

Instantly share code, notes, and snippets.

@elomatreb
elomatreb / LogSqlProvider.php
Created February 6, 2016 19:22
Laravel Service Provider that logs all SQL queries (with bindings).
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use DB;
use Log;
/**
@elomatreb
elomatreb / YAML.sublime-settings
Created July 25, 2014 21:53
Make Sublime Text format YAML files correctly
{
"translate_tabs_to_spaces": true,
"tab_size": 2
}
<?xml version="1.0" encoding="UTF-8" ?>
<Root>
<KeyboardLayout>de-DE</KeyboardLayout>
<MouseXMode Value="Bindings_MouseRoll" />
<MouseXDecay Value="0" />
<MouseYMode Value="Bindings_MousePitch" />
<MouseYDecay Value="0" />
<MouseReset>
<Primary Device="{NoDevice}" Key="" />
<Secondary Device="{NoDevice}" Key="" />
@elomatreb
elomatreb / autoexec.cfg
Last active September 27, 2018 07:03
my CSGO settings
// General
sensitivity 1.15 // 1200 DPI
zoom_sensitivity_ratio_mouse 1
cl_autowepswitch 0
cl_disablehtmlmotd 1
net_graph 1
net_graphpos 3
net_graphproportionalfont 0
viewmodel_offset_y 2
body,
body.system-font {
font-family: sans-serif;
}
.column {
flex-grow: 1;
}
.status__content {
@elomatreb
elomatreb / adjustChapterTimings.rb
Created January 17, 2018 11:07
Utility script that can adjust (shift forwards/backwards) the timing of Matroska chapters (given in XML chapter files, obtainable with `mkvextract somefile.mkv chapters out.xml`)
#!/usr/bin/env ruby
require "fileutils"
require "nokogiri"
class Timestamp
def self.parse(raw)
return nil unless raw.match?(/\A\d\d:\d\d:\d\d.\d+\z/)
hours, minutes, seconds = raw.split ":"
ts = 0r
@elomatreb
elomatreb / renamer.rb
Last active January 11, 2018 03:27
Renaming script I use for managing episodes of downloaded series batches
#!/usr/bin/env ruby
require "fileutils"
require "highline"
# Characters illegal in most filenames
ILLEGAL_CHARS = %w[< > : " / \\ | * ?]
cli = HighLine.new
@keyframes lol {
0% {
opacity: 0;
transform: rotate(-1440deg) scale(0);
}
100% {
opacity: 1;
transform: rotate(0deg) scale(1);
}
@elomatreb
elomatreb / github.css
Created September 2, 2017 07:01
Some of my userstyles. Usually just for proper fonts
@-moz-document domain("github.com") {
body,
.markdown-body,
.default-label .sha .ellipses,
.tooltipped::after {
font-family: sans-serif;
}
pre,
code,
@elomatreb
elomatreb / gh.css
Created August 18, 2017 22:19
Userstyle to make Github actually use system fonts (if you have changed them). Probably not exhaustive but all occurrences of sans-serif and monospace I found
@-moz-document domain("github.com") {
body,
.markdown-body,
.default-label .sha .ellipses,
.tooltipped::after {
font-family: sans-serif;
}
pre,
code,