Skip to content

Instantly share code, notes, and snippets.

@nozpheratu
nozpheratu / gist:236a40b4f6026269edc9
Created January 7, 2016 20:40
powershell_out! chef output
# Logfile created on 2016-01-07 20:30:46 +0000 by logger.rb/41954
[2016-01-07T20:30:47+00:00] INFO: Started chef-zero at http://localhost:8889 with repository at C:\ProgramData\OpsWorksAgent\var\chef\71300020150612113504
One version per cookbook
clients at C:/ProgramData/OpsWorksAgent/var/chef/71300020150612113504/clients
cookbooks at C:/ProgramData/OpsWorksAgent/71300020150612113504/chef/cookbooks
data_bags at C:/ProgramData/OpsWorksAgent/var/chef/71300020150612113504/data_bags
environments at C:/ProgramData/OpsWorksAgent/var/chef/71300020150612113504/environments
nodes at C:/ProgramData/OpsWorksAgent/var/chef/71300020150612113504/nodes
roles at C:/ProgramData/OpsWorksAgent/var/chef/71300020150612113504/roles
users at C:/ProgramData/OpsWorksAgent/var/chef/71300020150612113504/users
@nozpheratu
nozpheratu / gist:8445614
Created January 15, 2014 22:01
Twitter Bootstrap Mail Interface
<table class="table table-condensed table-hover">
<thead>
<tr>
<th class="span1"><input type="checkbox"></th>
<th class="span2"></th>
<th class="span2"></th>
<th class="span9"></th>
<th class="span2"></th>
</tr>
</thead>
@nozpheratu
nozpheratu / seeds.rb
Created March 21, 2013 16:53
seed file for country/state creation
# encoding: utf-8
Country.delete_all
ActiveRecord::Base.connection.reset_pk_sequence!('countries')
Country.create(:id=>1,:iso=>"AD",:name=>"Andorra")
Country.create(:id=>2,:iso=>"AE",:name=>"United Arab Emirates")
Country.create(:id=>3,:iso=>"AF",:name=>"Afghanistan")
Country.create(:id=>4,:iso=>"AG",:name=>"Antigua and Barbuda")
Country.create(:id=>5,:iso=>"AI",:name=>"Anguilla")
Country.create(:id=>6,:iso=>"AL",:name=>"Albania")
Country.create(:id=>7,:iso=>"AM",:name=>"Armenia")
$CLASSPATH << "/bin/Sikuli-IDE/"
require "sikuli-script.jar"
java_import 'org.sikuli.script.Region'
java_import 'org.sikuli.script.Screen'
java_import 'org.sikuli.script.Settings'
java_import 'org.sikuli.script.SikuliEvent'
java_import 'org.sikuli.script.SikuliScript'
#Crome X30 Y109
##Userable
module Userable
def self.included(base)
base.has_one :user, :as => :userable, :dependent => :destroy, :autosave => true
base.validate :user_must_be_valid
base.alias_method_chain :user, :autobuild
base.extend ClassMethods
base.define_user_accessors
end
rake aborted!
No such file or directory - /assets/mercury/mercury.css
(in /home/robot/.rvm/gems/ruby-1.9.3-p0/gems/mercury-rails-0.9.0/app/assets/stylesheets/_mercury-sass.scss)
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:24:in `read'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:24:in `block in depend_on'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:17:in `each'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:17:in `depend_on'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/less-rails-2.2.6/lib/less/rails/import_processor.rb:11:in `evaluate'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/home/robot/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate'
var Aloha = window.Aloha || ( window.Aloha = {} );
Aloha.settings =
{
contentHandler: {
insertHtml: ['word', 'generic', 'oembed', 'sanitize', 'videoembed'],
sanitize: "relaxed",
allows: {
// elements allowed in the content
elements: [
'a', 'abbr', 'b', 'blockquote', 'br', 'cite', 'code', 'dd', 'del', 'dl', 'dt', 'em',
@nozpheratu
nozpheratu / gist:4534493
Created January 14, 2013 23:21
My Aloha Page
<script data-aloha-plugins="common/ui,common/format,common/highlighteditables,common/link,common/image,common/align,common/table,common/horizontalruler,extra/headerids,common/list,extra/metaview,common/abbr,extra/formatlesspaste,common/characterpicker,common/contenthandler,custom/videoembed" src="/assets/aloha/aloha-full.js"></script>
<div id="aloha"></div>
<script>
//<![CDATA[
Aloha.ready( function() {
Aloha.settings.contentHandler.insertHtml = [ 'word', 'generic', 'sanitize', 'videoembed' ];
Aloha.settings.contentHandler.sanitize = {
// elements allowed in the content
@nozpheratu
nozpheratu / gist:414fda667f8daff46f38
Created November 7, 2014 23:44
AgileCRM duplicate note creation
D, [2014-11-07T17:40:56.510399 #16808] DEBUG -- : [httplog] Connecting: justtesting.agilecrm.com:443
D, [2014-11-07T17:40:56.709039 #16808] DEBUG -- : [httplog] Sending: POST http://justtesting.agilecrm.com:443/dev/api/contacts/email/note/add
D, [2014-11-07T17:40:56.709118 #16808] DEBUG -- : [httplog] Data: email=cyle@cogmation.com&note={"subject":"Made a webstore purchase","description":"Order ID: i9vtb0ima\nPayment ID: ch_14wLO12XtjxbXZd4RobbvR3I\n-----------------------------------------------------------\n1 STEM Virtual Robotics Toolkit (@500.00/ea): $500.00\n-----------------------------------------------------------\nSub-total: $500.00\nPST: $0.00\nGST: $25.00\nTOTAL: $525.00\n\nGo to http://cogmation.com/transactions/i9vtb0ima for additional information."}
D, [2014-11-07T17:40:57.405360 #16808] DEBUG -- : [httplog] Status: 204
D, [2014-11-07T17:40:57.405435 #16808] DEBUG -- : [httplog] Benchmark: 0.696179858 seconds
D, [2014-11-07T17:40:57.405488 #16808] DEBUG -- : [httplog] Response:
@nozpheratu
nozpheratu / gist:806f0380ea34694260d1
Created October 8, 2014 17:11
Add Tags to contacts 404
cyle@cyle-UX302LG:~/development/ruby/gems/agilecrm-ruby-api (seperate-classes)$ curl https://mydomain.agilecrm.com/dev/api/contacts/bulk/tags -H "Accept : application/json" -d '{"tags":["Paid in December" "Not paid in March" "paid in April"], "contact_ids":[4808361379889152]}' -v -u "myemail@example.com:xxxxx" -X POST
* About to connect() to mydomain.agilecrm.com port 443 (#0)
* Trying 72.14.246.1... connected
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):