Skip to content

Instantly share code, notes, and snippets.

export const insert = new ValidatedMethod({
name: 'spot_bid_profiles.insert',
validate: new SpotBidProfiles.schema,
run({}) {
return SpotBidProfiles.insert({}, null, region);
},
});
import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
import { Factory } from 'meteor/factory';
import { Todos } from '../todos/todos.js';
class SpotBidProfileCollection extends Mongo.Collection {
insert(list, callback) {
return super.insert(list, callback);
}
remove(selector, callback) {
import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
import { Factory } from 'meteor/factory';
import { Todos } from '../todos/todos.js';
class SpotBidProfileCollection extends Mongo.Collection {
insert(list, callback) {
return super.insert(list, callback);
}
remove(selector, callback) {
* Customer (id, email address, display name)
* ShoppingCart (contain Products, discounts)
SpotBidMarketItem Products (has price)
SpotBidProfile (AWS::SpotFleetConfig)
- user_id
- display_name
- instance_type (c4.large)
const Rx = require('rxjs/Rx');
const mongoose = require('mongoose');
mongoose.connect('localhost:27017/spot-2016-11-15');
var SpotInstanceSchema = mongoose.Schema({ ami_id: 'string', name: 'string', zone: 'string' });
var SpotInstance = mongoose.model('spot_instance', SpotInstanceSchema);
var cursor = SpotInstance.find({}).cursor();
} catch(e) {
}
@wesmaldonado
wesmaldonado / gist:5602312
Created May 17, 2013 22:08
Dedicated to the pointless argument @bionicpill and @TroyJMorris had about the back button.
Back Button Boy: Do not try and hit the back button. That's impossible. Instead... only try to realize the truth.
Neo: What truth?
Back Button Boy: There is no back button.
Neo: There is no back button?
Back Button Boy: Then you'll see, that it is not the app that goes back, it is only yourself.
require 'test/unit'
module M
def f
CONSTANT + 1
end
end
class C
CONSTANT = 1
mysql> use test;
Database changed
mysql> create table test_innodb engine=innodb;
ERROR 1113 (42000): A table must have at least 1 column
mysql> create table test_innodb (id int not null primary key) engine=innodb;
Query OK, 0 rows affected, 2 warnings (0.09 sec)
mysql> show create table test_innodb;
+-------------+-------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
Javascript Obfuscation, Minification and why it doesn't really matter.
I'm working on placing some geocaches[http://www.geocaching.com] and they must be 0.1 miles away from other geocaches. Being a programmer I thought, well, let's just write a bookmarklet to augment the geocaching website with a radius around the caches displayed on the map. So I googled for chunk of code that would do this because I'm lazy. The first tool was http://www.freemaptools.com/radius-around-point.htm and its UI was clunky but the output looked good enough to me. So I dig into the source... and *gasp* what is this?
10111010001000010111010000111101010101101101110100010101010100100001...
http://www.freemaptools.com/script/radius-around-point.js
At that point, I could've just looked for the next site but I have a few tricks up my sleeve since I've had to dig into ridiculous javascript for serveral of my jobs... The first trick is just use chrome developer tools, it'll probably get you 90% of the way there... and look, it does!