Skip to content

Instantly share code, notes, and snippets.

View timuckun's full-sized avatar

Tim Uckun timuckun

  • Lantel Integrated Solutions
  • New Zealand
View GitHub Profile
#!/usr/bin/env ruby
require 'thor'
require 'dotenv'
Dotenv.load
module Db
class Ops < Thor
namespace :db
def self.exit_on_failure?
This works.
```javascript
export const T ={
x: "x",
y: 1,
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];
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
$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:
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),
@timuckun
timuckun / gist:873301
Created March 16, 2011 21:06
Rake error
== 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"
#the knob file
--
2 application:
3 root: /usr/local/home/tim/source/ruby/rails_sites/torquebox
4 env: development
~
#/config/torquebox.yml
# 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
$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`