Skip to content

Instantly share code, notes, and snippets.

View banderson623's full-sized avatar

Brian Anderson banderson623

  • Gain Compliance
  • Rocklin, CA
View GitHub Profile
@banderson623
banderson623 / userscript.js
Last active January 30, 2023 21:27
Use native notification center for Slack in fluid.app
var clickOverrides = function(){
// Automatically mark ALL as read and scroll to it
// when clicking on a channel (stared or normal)
$('#channel-list, #starred-list').on('click',function(){
TS.ui.forceMarkAllRead();
TS.ui.scrollMsgsSoFirstUnreadMsgIsInView();
});
};
.light_theme .message {
color: #fff;
font-size: 16px;
}
.message .mention {
//background: #ccc;
//color: #f60;
font-weight: bold;
}
http://ox-d.sbnation.com/w/1.0/acj?o=5874435405&callback=OX_5874435405&ju=http%3A//www.sbnation.com/college-football/2013/11/10/5089030/bcs-rankings-standings-2013-florida-state-ohio-state&jr=&tid=17%2C1%2C12&pgid=13535&auid=
538460
549373
320307
&c.browser_width=xlarge&c.device_type=desktop&c.network=sbn&c.entry_id=4853071&c.entry_type=article&c.hub_page=college-football&c.entry_group=1%2C7%2C17033%2C17367%2C17505%2C18451%2C18699%2C20451&c.campaign_id=1045&c.component_name=NCAA%20Content%20Takeover&c.component_id=9691&c.component_type=reskin&res=1920x1200x24&plg=swf%2Csl%2Cqt%2Cshk%2Cpm&ch=UTF-8&tz=420&sd=5
@banderson623
banderson623 / activity.scss
Created February 22, 2014 21:58
svg css + animation
svg {
width: 100%;
height: 100%;
g#clickable path,
g#clickable rect,
g#clickable text,
{
cursor: pointer;
}
@banderson623
banderson623 / svg.js
Created February 22, 2014 21:54
SVG Library
var BitByte = BitByte || {};
// Note - This needs a dom manipulation library like Zepto or jQuery
BitByte.SVG = (function($) {
"use strict";
// the constructor
var svg = function() {
//private variables
var $svg = $(arguments[0] || 'svg');
class Cricket
{
static void Main(string[] args)
{
bool condition1 = true;
bool condition2 = true;
bool condition3 = true;
bool condition4 = true;
bool condition5 = true;
def trivial_method(a,b)
if a
true
else
false
end
end
# convert to
@banderson623
banderson623 / hasy.rb
Created November 8, 2013 18:47
hashy
def do_something(a,b={})
puts "a is: " + a.to_s
puts "b is: " + b.inspect
end
do_something("hi")
do_something("Hello",{:cool_guy => "Levi"})
do_something("Hello",:cool_guy => "Levi")
class Object
def try_or_else(method_name,else_thing)
return self.public_send(method_name)
rescue NoMethodError
return else_thing
end
end
@banderson623
banderson623 / functions.scm
Created August 9, 2013 22:12
stupid scheme...
(define empty-stack-v (lambda () (vector) ))
(define empty-stack-v? (lambda(stack) (equal? stack (empty-stack-v))))
(define push-v (lambda (stack item)
(if (eqv? stack (empty-stack-v)) (vector item)
(vector-append (vector item) stack))
))
(define pop-v (lambda (stack)
(if (equal? stack (empty-stack-v))