Доклад про Chatops в Github: https://speakerdeck.com/jnewland/chatops-at-github
Бот Lita: https://github.com/litaio/lita
Наше расширение для Lita: https://github.com/Shopify/lita-external
Бот Hubot:
| bundle config --global jobs 3 # Number of cores - 1 |
| echo "puts User.count" | heroku run console --app=my-heroku-app --no-tty | |
| cat some_script.rb | heroku run console --app=my-heroku-app --no-tty | |
| heroku run bundle exec rails runner ./scripts/script.rb -a my-heroku-app | |
| heroku run bash |
| # Hash in params | |
| def product_params | |
| properties_keys = params[:product].try(:fetch, :properties, {}).keys | |
| params.require(:product).permit(:title, :description, properties: properties_keys) | |
| end | |
| # Nested hash in params | |
| def item_params | |
| params.require(:item).permit(values: permit_recursive_params(params[:item][:values])) | |
| end |
| lsof -Pn -i4 | grep LISTEN |
| ps ax | grep PROCESS_NAME | awk '{print "kill -9 " $1}' |
Доклад про Chatops в Github: https://speakerdeck.com/jnewland/chatops-at-github
Бот Lita: https://github.com/litaio/lita
Наше расширение для Lita: https://github.com/Shopify/lita-external
Бот Hubot:
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| ru: | |
| i18n: | |
| transliterate: | |
| rule: | |
| ё: 'yo' | |
| №: '#' | |
| є: 'e' | |
| ї: 'yi' | |
| а: 'a' | |
| б: 'b' |
| class AddCommentsCountToPosts < ActiveRecord::Migration | |
| def change | |
| change_table :posts do |t| | |
| t.integer :comments_count, default: 0 | |
| end | |
| reversible do |dir| | |
| dir.up { data } | |
| end | |
| end |
| <?php | |
| define("true ", false); | |
| function doIt() { | |
| define(" false", true); | |
| define("maybe", rand() & 1); | |
| } | |
| function ($stupid="clever") { | |
| if (assert_value($stupid)) { |