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
@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 / get-sprite.scss
Created July 23, 2012 23:20 — forked from dfadler/get-sprite.sass
A SASS (SCSS) mixin for generating a sprite declaration block that will work with media queries
// http://compass-style.org/reference/compass/helpers/sprites/
@mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true) {
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file
$sprite-image: sprite-file($map, $sprite);
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url
$sprite-map: sprite-url($map);
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position
@brubrant
brubrant / gist:3161278
Created July 22, 2012 22:46 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@brubrant
brubrant / gist:3015578
Created June 29, 2012 03:50 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* Forked by Brubrant for Backup purposes
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/