Skip to content

Instantly share code, notes, and snippets.

@StasKoval
StasKoval / application.rb
Created September 27, 2015 00:21 — forked from stereoscott/application.rb
Redirect Mobile User-Agent to Subdomain as Rack Middleware (in Rails)
module YourApp
class Application < Rails::Application
# ...
config.middleware.insert_before "Rack::Cache", "SubdomainRedirect"
# ...
end
end
$ ssh-keygen -t rsa
$ ssh-copy-id -i ~/.ssh/id_dsa.pub user@machine
$ ssh user@machine
require 'net/ssh'
require 'logger'
Net::SSH.start(
'host', 'user',
:host_key => "ssh-rsa",
@StasKoval
StasKoval / regex-console.text
Last active September 14, 2015 13:10
Remove all console.log from JS in Sublime
Ensure regex button is selected and then type this in the search field.
\s*console\.log(.*);
@StasKoval
StasKoval / install-comodo-ssl-cert-for-nginx.rst
Last active September 1, 2015 13:44 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

CREATE TABLE `build_flows` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`device_id` int(11) DEFAULT NULL,
`device_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`job_id` int(11) DEFAULT NULL,
`job_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`branch` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`build_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`pbt_sdk` tinyint(4) DEFAULT '0',
`pbt_opensource` tinyint(4) DEFAULT '0',
CREATE TABLE `component_status_logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`component_id` int(11) DEFAULT NULL,
`build_id` int(11) DEFAULT NULL,
`build_flow_id` int(11) DEFAULT NULL,
`test_ci_result_id` int(11) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`statistic` varchar(255) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
api_v1_employer_applicant_comments GET /api/v1/employer_applicant_comments(.:format) api/v1/employer_applicant_comments#index
POST /api/v1/employer_applicant_comments(.:format) api/v1/employer_applicant_comments#create
new_api_v1_employer_applicant_comment GET /api/v1/employer_applicant_comments/new(.:format) api/v1/employer_applicant_comments#new
edit_api_v1_employer_applicant_comment GET /api/v1/employer_applicant_comments/:id/edit(.:format) api/v1/employer_applicant_comments#edit
api_v1_employer_applicant_comment GET /api/v1/employer_applicant_comments/:id(.:format) api/v1/employer_applicant_comments#show
PATCH /api/v1/employer_applicant_comments/:id(.:format) api/v1/employer_applicant_comments#update
PUT /api/v1/employer_applicant_comments/:id(.:format) api/v1/employer_applicant_comments#update
Шестьдесят населенных пунктов восьми звездных систем, от Солнца до Альтаира, зависели от торговли умами. Правда заключалась в том, что человечество шагнуло слишком далеко, и каждая планета не могла позволить себе развивать все области науки и техники. Зачем содержать тысячи средних медицинских училищ повсюду, если можно иметь пять высших и выпускать медиков высшей квалификации и торговать ими с другими планетами, где они могли бы учить других. Преимущества такой системы были огромными, число искусственных специалистов ограничено, больше того, прогресс шел быстрее, если все специалисты в одной области тесно соприкасались друг с другом.
Система казалась высоко практичной. Донал был одним из немногих людей, ясно видевших заключенные в ней недостатки.
Спорным вопросом торговли контрактами было следующее: насколько искусный специалист является индивидуальностью со своими правами и насколько он является собственностью нанимателя. Если он индивидуальность, торговля между мирами превращалась в серию индивидуальных сд
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up mongodb-org-shell (2.6.0) ...
Setting up mongodb-org-server (2.6.0) ...
Adding system user `mongodb' (UID 104) ...
Adding new user `mongodb' (UID 104) with group `nogroup' ...
Not creating home directory `/home/mongodb'.
Adding group `mongodb' (GID 107) ...
Done.
Adding user `mongodb' to group `mongodb' ...
Adding user mongodb to group mongodb
InterviewResponse.last.email_stats
InterviewResponse Load (0.5ms) SELECT `interview_responses`.* FROM `interview_responses` ORDER BY `interview_responses`.`id` DESC LIMIT 1
EmailStat Load (0.4ms) SELECT `email_stats`.* FROM `email_stats` WHERE `email_stats`.`stat_id` = 4 AND `email_stats`.`stat_type` = 'InterviewResponse'
=> #<ActiveRecord::Associations::CollectionProxy [#<EmailStat id: 3, user_id: 5, message_id: "<[email protected]>", status: "delivered", stat_id: 4, stat_type: "InterviewResponse", created_at: "2015-07-16 13:56:11", updated_at: "2015-07-16 13:56:14">]>