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
alias dbreset='rake db:drop; rake db:create; rake db:migrate; rake db:seed; rake db:test:prepare' | |
alias dbupdate='rake db:migrate; rake db:seed; rake db:test:prepare' | |
alias gcall='git add .; git commit -am' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>gh3</title> | |
</head> | |
<body> | |
<h2>Get file contents</h2> |
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
curl http://localhost:3000/assets/preload_store.js -O | |
curl http://localhost:3000/assets/locales/i18n.js -O | |
curl http://localhost:3000/assets/locales/en.js -O | |
curl http://localhost:3000/assets/logster.js -O | |
curl http://localhost:3000/assets/env.js -O | |
curl http://localhost:3000/assets/discourse/lib/probes.js -O | |
curl http://localhost:3000/assets/handlebars.js -O | |
curl http://localhost:3000/assets/development/jquery-2.1.1.js -O | |
curl http://localhost:3000/assets/jquery_include.js -O | |
curl http://localhost:3000/assets/development/ember.js -O |
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
// Go to menue: | |
// find->find in files | |
// Switch on reg_ex button | |
// Find: | |
^(.*)$ | |
// Where: | |
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/* | |
// Then click on the find button | |
// Be careful to not click on Replace!!! |
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
-----> Ruby app detected | |
-----> Compiling Ruby/Rails | |
-----> Using Ruby version: ruby-2.3.4 | |
-----> Installing dependencies using bundler 1.15.2 | |
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment |
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
[36m2018-01-29T02:22:40.331758837Z app[web.1]:[0m [9ce2d1f3-a09d-41c5-9ea9-b4daf4afd36d] vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/model_schema.rb:343:in `columns_hash' | |
[36m2018-01-29T02:22:40.331764530Z app[web.1]:[0m [9ce2d1f3-a09d-41c5-9ea9-b4daf4afd36d] vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/dynamic_matchers.rb:60:in `block in valid?' | |
[36m2018-01-29T02:22:40.331770265Z app[web.1]:[0m [9ce2d1f3-a09d-41c5-9ea9-b4daf4afd36d] vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/dynamic_matchers.rb:60:in `each' | |
[36m2018-01-29T02:22:40.331776462Z app[web.1]:[0m [9ce2d1f3-a09d-41c5-9ea9-b4daf4afd36d] vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/dynamic_matchers.rb:60:in `all?' | |
[36m2018-01-29T02:22:40.331782294Z app[web.1]:[0m [9ce2d1f3-a09d-41c5-9ea9-b4daf4afd36d] vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/dynamic_matchers.rb:60:in `valid?' | |
[36m2018-01-29T02:22:40.331788025Z app[web.1]:[0m |
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
# The ChatGptService class provides an easy way to integrate with the OpenAI ChatGPT API. | |
# It allows you to send and receive messages in a conversation thread, and reset the thread | |
# if necessary. | |
# | |
# Example usage: | |
# chat_gpt_service = ChatGptService.new(BEARER_TOKEN) | |
# response = chat_gpt_service.chat("Hello, how are you?") | |
# puts response | |
# # => {"message"=> | |
# # {"id"=>"8e78691a-1fde-4bd5-ad68-46b23ea65d8f", |
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
require 'nokogiri' | |
require 'open-uri' | |
# Get a Nokogiri::HTML:Document for the page we're interested in... | |
doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove')) | |
# Do funky things with it using Nokogiri::XML::Node methods... | |
#### |