Skip to content

Instantly share code, notes, and snippets.

View orangewolf's full-sized avatar

Rob Kaufman orangewolf

View GitHub Profile
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install casks
brew tap caskroom/cask
echo 'export HOMEBREW_CASK_OPTS="--appdir=/Applications"' >> ~/.bash_profile
source ~/.bash_profile
# Install Postgresql via homebrew
@orangewolf
orangewolf / fileupload.js.jsx
Created September 23, 2016 17:50
Formsy File Upload
// in render return
<div>
<Formsy.Form ref="form"
onValidSubmit={this.onSubmit}
onValid={this.props.enableSubmit}
className=""
onInvalid={this.props.disableSubmit}
onChange={this.props.onChange}>
<FormsyFile
id="avatar"
Step 1)
mkdir ./bundle
touch ./bundle/.gitkeep
git add ./bundle/.gitkeep
echo 'bundle/*' >> .gitignore
Step 2) in your Dockerfile
COPY ./bundle /bundle
ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
BUNDLE_JOBS=2 \
@orangewolf
orangewolf / Ubuntu16SwapFile
Created March 30, 2017 06:17 — forked from MPJHorner/Ubuntu16SwapFile
Create Swap File on Ubuntu 16.04
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo swapon --show
}
+ this.onUpdateMessage = this.updateMessage.bind(this)
+ this.onUpdateUser = this.updateUser.bind(this)
+ this.onUpdateEvent = this.updateEvent.bind(this)
}
componentWillMount(){
- eventStore.on('current event fetched', this.updateMessage.bind(this));
- eventStore.on('votes counted', this.updateMessage.bind(this));
- userStore.on('voted set to false', this.updateUser.bind(this));
- eventStore.on('new event created', this.updateEvent.bind(this));
### Keybase proof
I hereby claim:
* I am orangewolf on github.
* I am orangewolf (https://keybase.io/orangewolf) on keybase.
* I have a public key ASAqnmRtxkqGdZo5yQZdBoVFfHGtDYti12coZPt3ESFV2Qo
To claim this, I am signing this object:
Processing by Refinery::Feast::OrgsController#show as HTML
Rendering /home/app/refinerycms/core/app/views/layouts/application.html.erb
Rendering refinery/feast/orgs/show.html.erb within layouts/application
Rendered collection of refinery/blog/news/_card_vertical.html.erb [1 times] (94.5ms)
Rendered /home/app/refinerycms/core/app/views/glass/_cms_shortcut.html.erb (1.0ms)
Rendered refinery/blog/content_spots/_home_featured.html.erb (133.9ms)
Rendered /home/app/blog/app/views/refinery/blog/_content_spot.html.erb (138.2ms)
Rendered /home/app/refinerycms-feast/app/views/refinery/feast/_content_spot.html.erb (151.0ms)
Rendered refinery/blog/content_spots/_advertisement.html.erb (17.3ms)
Rendered collection of refinery/blog/news/_card_vertical.html.erb [6 times] (576.8ms)
diff --git a/src/services/OptimizelyActions.js b/src/services/OptimizelyActions.js
index bf38f78..a48e6aa 100644
--- a/src/services/OptimizelyActions.js
+++ b/src/services/OptimizelyActions.js
@@ -12,8 +12,14 @@ const DEFAULT_VARIATION = 'default'
function getCookie(name) {
const values = document.cookie.split(`; `)
+ const match = values.find(value => value.split('=')[0] === name)
+ if match {
$ cd /opt/atla/current
$ RAILS_ENV=production bundle exec rails c
> u = User.where(email: 'EMAIL').first
> u.password = u.password_confirmation = "PASSWORD"
> u.save
> exit
$ exit
@orangewolf
orangewolf / stacktrace.rb
Created January 31, 2019 17:33
relative-uri-error
URI::BadURIError: relative URI:
from uri/generic.rb:1491:in `find_proxy'
from faraday/connection.rb:88:in `block in initialize'
from faraday/options.rb:75:in `fetch'
from faraday/connection.rb:83:in `initialize'
from faraday.rb:67:in `new'
from faraday.rb:67:in `new'
from active_fedora/fedora.rb:89:in `authorized_connection'
from active_fedora/fedora.rb:63:in `caching_connection'
from active_fedora/fedora.rb:83:in `build_connection'