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
@dhh
dhh / linux-setup.sh
Last active July 19, 2024 07:52
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
// This is the traditional version of the RxSwift-based gist posted here:
// https://gist.github.com/cliss/51cb740b14f3cd56ba1d11f2a9a6ba02
// This won’t compile and it surely has errors.
// (The same may be true as the original.)
// Some things are obviously omitted.
// It's meant as illustrative rather than as actual running code.
//
// The problem being solved:
// There is a text field. When you type in it, all changes are coalesced
// for 0.3 seconds, and then an HTTP call is made, and a table is updated
@bmhatfield
bmhatfield / .profile
Last active June 18, 2024 09:38
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
/*
* AppleWidgetController.js
* Copyright (c) 2010-2011 Apple, Inc.
* All rights reserved.
*
* Responsibility: drb
*/
//
// Class: AppleWidgetController
@okor
okor / jshintrc
Last active June 20, 2022 15:00
Config for jshint
{
// Enforcing options
"bitwise": true, // true = flag bitwise operators which is probably a mistake
"camelcase": true, // true = require camelCase for all variable names
"curly": true, // require curly brackets, even for blocks with only one statement
"eqeqeq": true, // flag '==' and '!=' operators, in favor of '===' and '!=='
// "es3": false, // ecmascript support spec, not sure what this should be
"forin": true, // requires all for in loops to filter object's items
@anotheruiguy
anotheruiguy / web-fonts-asset-pipeline.md
Last active June 24, 2024 22:11
Custom Web Fonts and the Rails Asset Pipeline

Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.

Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.

As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.

The recommended way

Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.

Brian Anderson
Assignment 9 - Com S 352
April 4, 2012
[NOTE --> PLEASE USED A FIXED WIDTH FONT TO READ THIS DOCUMENT]
1. (25pts) Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in order
from low-end to high-end of user memory space), how would the first-fit, best- fit, and
worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in the arriving order)?
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@jt
jt / merge.md
Created August 23, 2011 18:47
Merge a forked gist

If someone forks a gist and you'd like to merge their changes. Do this:

  1. clone your repo, I use the name of the gist

     git clone git://gist.github.com/1163142.git gist-1163142
    
  2. add a remote for the forked gist, I'm using the name of my fellow developer

     git remote add aaron git://gist.github.com/1164196.git
    
@gvkhna
gvkhna / AppleMediaKeyController.h
Created August 23, 2010 20:51
Apple Media Key hotkey override
//
// AppleMediaKeyController.h
//
// Modified by Gaurav Khanna on 8/17/10.
// SOURCE: http://github.com/sweetfm/SweetFM/blob/master/Source/HMediaKeys.h
//
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without restriction,