Skip to content

Instantly share code, notes, and snippets.

@brubrant
brubrant / obs-recording-toggle.py
Created June 24, 2024 21:04 — forked from kode54/obs-recording-toggle.py
OBS Recording Toggle, based on obs-wayland-shortcuts, but using obs-cli and not obs-cli-leafac.
#!/usr/bin/env python3
# Original Author: Andrew Shark
# Homepage: https://gitlab.com/AndrewShark/obs-wayland-shortcuts
# License: GPLv3
# Modified By: Christopher Snowhill
# This script is made for convenience. It is invoked by a logid gesture for MX Master mouse.
@brubrant
brubrant / RiskAdjustedReturnMetrics.py
Created November 17, 2021 19:56 — forked from StuartGordonReid/RiskAdjustedReturnMetrics.py
Measured of Risk-adjusted Return
import math
import numpy
import numpy.random as nrand
"""
Note - for some of the metrics the absolute value is returns. This is because if the risk (loss) is higher we want to
discount the expected excess return from the portfolio by a higher amount. Therefore risk should be positive.
"""
@brubrant
brubrant / basic_statistics.ipynb
Last active July 30, 2020 17:45 — forked from tabrez/basic_statistics.ipynb
basic_statistics.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brubrant
brubrant / config.rb
Created July 22, 2016 22:32 — forked from nathansmith/config.rb
Example config.rb file for Compass
preferred_syntax = :sass
http_path = '/'
css_dir = 'assets/stylesheets'
sass_dir = 'assets/sass'
images_dir = 'assets/images'
javascripts_dir = 'assets/javascripts'
relative_assets = true
line_comments = true
# output_style = :compressed

Keybase proof

I hereby claim:

  • I am brubrant on github.
  • I am brubrant (https://keybase.io/brubrant) on keybase.
  • I have a public key whose fingerprint is FDC7 13B0 E085 CCA4 8240 8195 C036 EFD9 38E8 0BB3

To claim this, I am signing this object:

@brubrant
brubrant / grayscale css
Last active June 30, 2016 20:26 — forked from gedankennebel/gist:a4c9367cda02ad7e826f
CSS grayscale filter (go from grayscale to full color on hover) #css #sethneilson
img:hover {
-webkit-filter: grayscale(0%);
-webkit-transition: .5s ease-in-out;
-moz-filter: grayscale(0%);
-moz-transition: .5s ease-in-out;
-o-filter: grayscale(0%);
-o-transition: .5s ease-in-out;
filter: grayscale(0%);
}
@brubrant
brubrant / jetpack-inifnite-scroll-options-and-config.php
Created May 30, 2016 16:33
A lot of configuration of jetpack inifnite scroll settings
<?php
/*------------------------------------*\
Jetpack infinite Scroll Stufff
\*------------------------------------*/
function enable_infinite_scroll_for_blog() {
// General Conditions
add_theme_support( 'infinite-scroll', array(
@brubrant
brubrant / setEqualHeight.js
Last active March 18, 2016 01:04
Se equal height for all items.
function igualaAltura (itens) {
var maiorAlura = 0;
$(itens).each(function(index, el) {
$(el).css('height', 'auto');
if ( $(el).height() > maiorAlura ) {
maiorAlura = $(el).height();
@brubrant
brubrant / gist:050da6992e8ed89f75a4
Created October 31, 2014 14:12
MongoDB errors (modulus)
Error: failed to connect to [mongo.onmodulus.net:27017]
at null.<anonymous> (/mnt/data/1/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:569:74)
at emit (events.js:106:17)
at null.<anonymous> (/mnt/data/1/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:139:15)
at emit (events.js:98:17)
at Socket.<anonymous> (/mnt/data/1/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/connection.js:475:10)
at Socket.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:419:13)