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
#!/usr/bin/env ruby | |
require 'thor' | |
require 'dotenv' | |
Dotenv.load | |
module Db | |
class Ops < Thor | |
namespace :db | |
def self.exit_on_failure? |
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
This works. | |
```javascript | |
export const T ={ | |
x: "x", | |
y: 1, |
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
makeApiCall(url) { | |
return fetch(url) | |
.then((response) => { | |
if (!response.ok) { | |
throw new Error("Network response was not ok"); | |
} | |
return response.json(); | |
}) | |
.then(function (data) { | |
return data.observations[0]; |
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
set -ex | |
DIRECTORIES_TO_ARCHIVE="vendor/cache vendor/assets tmp/cache/assets public/assets public/packs " | |
# Fetch tarball archive containing cache and extract it. | |
# "tmp/assets/cache" and "public/assets". | |
if wget -q "https://www.googleapis.com/storage/v1/b/${GOOGLE_BUCKET_NAME}/o/${ARCHIVE_FILE_NAME}?alt=media" -O ${ARCHIVE_FILE_NAME} ; then | |
tar -xzf ${ARCHIVE_FILE_NAME} && rm -f ${ARCHIVE_FILE_NAME} | |
else |
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
$rake db:migrate VERSION=0 --trace | |
(in /usr/local/home/tim/source/ruby/rails_sites/parents_voice) | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
** Execute db:migrate | |
== TranslatePagePlugin: reverting ============================================ | |
rake aborted! | |
An error has occurred, this and all later migrations canceled: |
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
User.find(:all).each do |user| | |
user.plugins.create(:name => "refinerycms_news", | |
:position => (user.plugins.maximum(:position) || -1) +1) | |
end | |
page = Page.create( | |
:title => "News", | |
:link_url => "/news", | |
:deletable => false, | |
:position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1), |
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
== CreateRefinerycmsResourcesSchema: migrating =============================== | |
-- create_table("resources", {:force=>true}) | |
NOTICE: CREATE TABLE will create implicit sequence "resources_id_seq" for serial column "resources.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "resources_pkey" for table "resources" | |
-> 0.0050s | |
== CreateRefinerycmsResourcesSchema: migrated (0.0055s) ====================== | |
== CreateNewsItems: migrating ================================================ | |
-- create_table(:news_items, {:id=>true}) | |
NOTICE: CREATE TABLE will create implicit sequence "news_items_id_seq" for serial column "news_items.id" |
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 knob file | |
-- | |
2 application: | |
3 root: /usr/local/home/tim/source/ruby/rails_sites/torquebox | |
4 env: development | |
~ | |
#/config/torquebox.yml |
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
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require File.expand_path('../config/application', __FILE__) | |
require 'rake' | |
require 'torquebox/tasks' | |
Torquebox::Application.load_tasks |
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
$bundle | |
Fetching source index for http://rubygems.torquebox.org/ | |
Fetching source index for http://rubygems.org/ | |
You have requested: | |
org.torquebox.messaging-client = 1.0.0.CR1 | |
The bundle currently has org.torquebox.messaging-client locked at 1.0.0.CR1. | |
Try running `bundle update org.torquebox.messaging-client` |
NewerOlder