This file contains hidden or 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
vagrant@salt-master:~$ ps -efl|egrep salt-master | |
1 S root 6247 1 0 80 0 - 114799 poll_s 18:16 ? 00:00:00 /usr/bin/python /usr/bin/salt-master | |
1 S root 6249 1 0 80 0 - 114181 poll_s 18:16 ? 00:00:00 /usr/bin/python /usr/bin/salt-master | |
1 S root 6250 1 0 80 0 - 114181 poll_s 18:16 ? 00:00:00 /usr/bin/python /usr/bin/salt-master | |
1 S root 6253 1 0 80 0 - 114179 poll_s 18:16 ? 00:00:00 /usr/bin/python /usr/bin/salt-master | |
4 S root 6300 1 0 80 0 - 127915 poll_s 18:16 ? 00:00:00 /usr/bin/python /usr/bin/salt-master | |
1 S root 6311 6300 0 80 0 - 71406 pipe_w 18:16 ? 00:00:00 /usr/bin/python /usr/bin/salt-master | |
1 S root 6318 6300 0 80 0 - 62379 poll_s 18:16 ? 00:00:00 /usr/bin/python /usr/bin/salt-master | |
1 S root 6319 6300 0 80 0 - 62379 poll_s 18:16 ? 00:00:00 /usr/bin/python /usr/bin/salt-master | |
1 S root 6326 6300 0 80 0 - 191654 poll_s 18:16 ? 00:00:00 /usr |
This file contains hidden or 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
SELECT DISTINCT "posts".* | |
FROM "posts" | |
INNER JOIN memberships ON posts.group_id = memberships.group_id | |
WHERE (("posts"."published" = 't' | |
AND "memberships"."user_id" = 17403 | |
OR "posts"."published" = 't' | |
AND "posts"."user_id" = 17403)) | |
ORDER BY COALESCE(posts.liked_at, posts.updated_at, posts.created_at) DESC LIMIT 20 | |
OFFSET 0 |
This file contains hidden or 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
source 'https://rubygems.org' | |
# Requred for deployment with Trinidad | |
gem 'bundler' | |
gem 'rails', '3.2.13' | |
gem 'activeadmin' | |
gem 'activerecord-postgres-hstore' # PostgreSQL HStore support for ActiveRecord | |
gem 'airbrake' # using errbit, see config/errbit.rb |
This file contains hidden or 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
// Serialize a form into an object | |
// Credit goes to Tobias Cohen | |
// http://stackoverflow.com/a/1186309/51947 | |
$.fn.serializeObject = function() { | |
var o = {}; | |
var a = this.serializeArray(); | |
$.each(a, function() { | |
if (o[this.name] !== undefined) { | |
if (!o[this.name].push) { |
This file contains hidden or 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
[21:00:13] LaunchFrame.main:141: FTBLaunch starting up (version 1.1.4) | |
[21:00:13] LaunchFrame.main:142: Java version: 1.7.0_01 | |
[21:00:13] LaunchFrame.main:143: Java vendor: Oracle Corporation | |
[21:00:13] LaunchFrame.main:144: Java home: C:\Program Files\Java\jre7 | |
[21:00:13] LaunchFrame.main:145: Java specification: Java Virtual Machine Specification version: 1.7 by Oracle Corporation | |
[21:00:13] LaunchFrame.main:147: Java vm: Java HotSpot(TM) 64-Bit Server VM version: 21.1-b02 by Oracle Corporation | |
[21:00:13] LaunchFrame.main:149: OS: amd64 Windows 7 6.1 | |
[21:00:13] LocaleUpdater.checkForUpdates:46: [i18n] Checking for updates ... | |
[21:00:13] DownloadUtils.getStaticCreeperhostLink:95: http://repo.creeperhost.net/static/FTB2/locales | |
[21:00:14] LocaleUpdater.checkForUpdates:61: [i18n] remoteVer = 9 |
This file contains hidden or 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
-- fill: fills a hole with whatever materials are on hand | |
-- | |
-- The turtle will fill the first hole it runs into with the | |
-- materials on hand. When it runs out of materials to use | |
-- as filler, the turtle will return to where it was launched | |
-- and attempt to pick up more things to fill the hole with. | |
-- | |
-- The turtle will return to where it was launched from | |
-- as soon as there is nothing left to fill or if there | |
-- are no available materials to fill the hole with. |
This file contains hidden or 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
module Concerns | |
module MessagableWithData | |
extend ActiveSupport::Concern | |
included do | |
Message.class_eval do | |
has_many :message_data, | |
class_name: MessageData, |
This file contains hidden or 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
email_verification = CompanyEmailVerification.find_or_initialize_by_company_id_and_user_id( | |
user_id: current_user.id, | |
company_id: params[:id].to_s | |
) | |
if email_verification.persisted? | |
email_verification.send_verification_email | |
return render json: { success: true } | |
end |
This file contains hidden or 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
target = URI.parse("http://www.your-host.org") | |
petitions = Petition.select([:id, :slug]).limit(10) | |
urls = petitions.map { |p| app.url_for(:subdomain=>"www", :action=>"show", :controller=>"petitions", :host => target.host, :id => p.slug) } | |
File.open('urls.txt') { |io| urls.each { |u| io.puts u } } |
This file contains hidden or 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
/Users/damien/.rvm/gems/ruby-1.9.3-p125/gems/scrypt-1.0.3/lib/scrypt.rb:33: [BUG] Segmentation fault | |
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] | |
-- Control frame information ----------------------------------------------- | |
c:0034 p:---- s:0154 b:0154 l:000153 d:000153 CFUNC :__sc_crypt | |
c:0033 p:0077 s:0148 b:0146 l:000145 d:000145 METHOD /Users/damien/.rvm/gems/ruby-1.9.3-p125/gems/scrypt-1.0.3/lib/scrypt.rb:33 | |
c:0032 p:0032 s:0140 b:0140 l:000139 d:000139 METHOD /Users/damien/Fun/devise/lib/devise/encryptors/scrypt.rb:12 | |
c:0031 p:0049 s:0133 b:0133 l:001dc8 d:000132 LAMBDA /Users/damien/Fun/devise/test/encryptors_test.rb:8 | |
c:0030 p:---- s:0127 b:0127 l:000126 d:000126 FINISH | |
c:0029 p:0102 s:0125 b:0125 l:002198 d:002198 METHOD /Users/damien/.rvm/gems/ruby-1.9.3-p125/gems/mocha-0.10.0/lib/mocha/integration/mini_test/version_230_to_251.rb:28 |