This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repos = []; | |
$(document).ready(function(){ | |
$('#git_error').hide(); | |
$.each($( "#github_list_showing tr td"),function(index,value){ | |
repos.push($(value).data()); | |
}); | |
$( ".all_repos tr" ).draggable({helper: 'clone'}); | |
$( "#github_list_showing" ).droppable({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Struct.new("Student", :scores, :first_name, :last_name, :ssn) | |
class AverageScores | |
attr_accessor :scores | |
def initialize(scores) | |
@scores = scores | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module NewEntryDupTest | |
attr_accessor :entry, :old_entries | |
# def initialize(*args) | |
# @old_entries ||= [] | |
# @entry = :entries | |
# end | |
@@old_entries = ['Homer'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var path = require('path'); | |
var favicon = require('static-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var needle = require('needle'); | |
var routes = require('./routes/index'); | |
var users = require('./routes/users'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[client] | |
user = <user> | |
password = <password> | |
host = localhost | |
port=3306 | |
socket=/Applications/MAMP/tmp/mysql/mysql.sock | |
[mysqld] | |
datadir=/Applications/MAMP/db/mysql | |
port=3306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[client] | |
user=<user> | |
password=<password> | |
host=localhost | |
port=3307 | |
socket=/tmp/mysql2.sock | |
[mysqld] | |
port=3307 | |
datadir=/usr/local/var/mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######## | |
## mySQL | |
alias mysql2d='mysqld_safe --defaults-file=/etc/my2.cnf &' | |
alias mysql2='mysql --defaults-file=/etc/my2.cnf' | |
alias mysqld1='mysqld_safe --defaults-file=/etc/my.cnf &' | |
alias mysql1='mysql --defaults-file=/etc/my.cnf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP PROCEDURE IF EXISTS drop_accounting_columns_from_product_categories; | |
DELIMITER ;; | |
CREATE PROCEDURE drop_accounting_columns_from_product_categories() begin | |
/* delete columns if they exist */ | |
IF EXISTS( select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='product_categories' | |
and COLUMN_NAME='volume_accounting_id') THEN | |
DELETE FROM `product_categories` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongoose.model('text_search').findOneAndUpdate({_id: doc._id},{ | |
name: doc['email'] + '\n' + doc['first_name'] + '\n' + doc['last_name'], | |
email: doc['email'], | |
full_name: doc['first_name'] + ' ' + doc['last_name'], | |
type: 'user_unassigned' | |
},{upsert : true}, function (err, data) { | |
if (err) { | |
console.log(err); | |
} | |
return data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FACTORY bike-factory.js | |
angular.module('bike-api', []) | |
.factory('bikeFactory', ['$http', function ($http) { | |
var url = 'http://localhost:8080/bike'; | |
var bike = function () { | |
var self = this; | |
self.getDefaults().then(function (response) { |