Skip to content

Instantly share code, notes, and snippets.

def find_associate_common user_ids
# search types
@selected_types = []
@selected_types << 'User'.constantize
# default fields to search
@default_assoc_search_fields = ['last_name_text', 'first_name_text', 'middle_name_text', 'email_text', 'city_region_text', 'country_text']
@search_all_profile = params[:search_all_profile] ||= false
@alanstevens
alanstevens / scroll.ps
Last active December 10, 2015 19:42
Mac scrolling on windows from powershell
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
@alanstevens
alanstevens / exploring_prototypes.js
Last active December 27, 2015 18:42
Exploring prototypal inheritance
var Parent = function(first, second){
this.first = first;
this.second = second;
}
var Child = function(first, second, third){
Parent(first, second);
// or ?
Parent.call(this, first, second)
// or ?
var path = require("path");
var fs = require("fs");
var rimraf = require("rimraf");
var Handlebars = require("handlebars");
var Templates = require("./templates");
module.exports.generate = function(data) {
Templates.init();
@alanstevens
alanstevens / ir_black.cson
Created February 23, 2016 13:29
An ir_black (https://github.com/twerth/ir_black) theme for Atom terminal-plus (https://atom.io/packages/terminal-plus). Add the first snippet to your config.cson and the second to your styles.less.
"terminal-plus":
ansiColors:
normal:
black:
red: 78
green: 78
blue: 78
alpha: 1
blue:
red: 148
  1. OWNERSHIP OF INVENTIONS

b. Use or Incorporation of Inventions If in the course of the Relationship, I use or incorporate into a product, process or machine any Invention not covered by Section 4(d) of this Agreement in which I have an interest, I will promptly so inform the Company. Whether or not I give such notice, I hereby irrevocably grant to the Company a nonexclusive, fully paid-up, royalty-free, assumable, perpetual, worldwide license, with right to transfer and to sublicense, to practice and exploit such Invention and to make, have made, copy, modify, make derivative works of, use, sell, import, and otherwise distribute under all applicable intellectual properties without restriction of any kind.

c. Inventions I understand that “Inventions” means discoveries, developments, concepts, designs, ideas, know how, improvements, inventions, trade secrets and/or original works of authorship, whether or not patentable, copyrightable or otherwise legally protectable. I understand this includes, but is not

using System.Collections.Generic;
using EMCBTests.Shared.Extensions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace EMCBTests.Entities.Breaker
{
public class Breaker
{
public string AgentId { get; set; }
@alanstevens
alanstevens / arrange_90s.rb
Last active November 5, 2016 23:17
I am collecting a 90s playlist. I gathered the tracks manually and put them in the file input.txt. Next, I wrote a ruby script to sort and group the data in a way that I could use to quickly gather the files I need to finish my playlist. I output my results to the console and to the file output.txt.
#!/Users/Alan/.rbenv/shims/ruby -w
output = ""
artists ||= []
tracks ||= []
File.open( File.expand_path(File.dirname(__FILE__), 'all.txt' ) ).each do |line|
tracks << line
artist = line.split(" - ")[1]
artists << artist
end
@alanstevens
alanstevens / create_gather_list.rb
Last active July 20, 2017 23:13
Gather song list by decade
#!/Users/Alan/.rbenv/shims/ruby -w
output = ""
artists ||= []
tracks ||= []
File.open( File.expand_path(File.dirname(__FILE__), 'all.txt' ) ).each do |line|
tracks << line
artist = line.split(" - ")[1]
artists << artist
end