Command Line
pry -r ./config/app_init_file.rb- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb- load your rails into a pry session
Debugger
| // ************* | |
| // This is the frontend search part | |
| // ************* | |
| // THE STYLES THAT ARE USED BY THE COMPONENT | |
| // STILL HERE BECAUSE WE POTENTIALLY EXTRACT THEM | |
| let styles = { | |
| item: { | |
| padding: '2px 6px', | |
| cursor: 'default' |
| require 'nokogiri' | |
| require 'httparty' | |
| doc = Nokogiri::XML(HTTParty.get("https://www.google.de").body) | |
| doc.css('link').map{ |a| a.text }.each do |link| | |
| begin | |
| source = HTTParty.get(link).body | |
| url = source.scan(/"https:\/\/.*\.mp4.*"/).first | |
| `wget #{url}` | |
| # p url |
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
| // client (client.js) | |
| require('seneca')() | |
| // a local pattern | |
| .add('say:hello', function (msg, respond){ respond(null, {text: "Hi!"}); }) | |
| // send any role:math patterns out over the network | |
| // IMPORTANT: must match listening service | |
| .client({ type: 'tcp', pin: 'role:math' }) |
| 'use strict'; | |
| var mongoose = require('mongoose'), | |
| path = require('path'), | |
| errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller')), | |
| _ = require('lodash'); | |
| var Grid = require('gridfs-stream'); | |
| Grid.mongo = mongoose.mongo; | |
| var gfs = new Grid(mongoose.connection.db); |
| var io = require('socket.io/node_modules/socket.io-client'); | |
| var querystring = require('querystring'); | |
| var http = require('http'); | |
| var data = querystring.stringify({ | |
| username: 'test', | |
| password: 'testtest' | |
| }); | |
| var options = { |
| describe "post #upload" do | |
| it "image to object" do | |
| container = create :container | |
| file = fixture_file_upload(Rails.root.join('spec/fixtures/files/example.jpg'), 'image/jpeg') | |
| container.attached_image = file | |
| post :upload, container: container.to_param | |
| expect(container.reload.attached_image).to be_present | |
| end | |
| end |