Fala Dev,
Como mencionei algumas vezes, tenho trabalhado bastante em conteúdo gratuito para complementar meus cursos.
E se você quiser aproveitar o fim de semana para aprender algo novo, aqui estão vários estudos completos e gratuitos:
Fala Dev,
Como mencionei algumas vezes, tenho trabalhado bastante em conteúdo gratuito para complementar meus cursos.
E se você quiser aproveitar o fim de semana para aprender algo novo, aqui estão vários estudos completos e gratuitos:
| # Original instructions: https://forum.cursor.com/t/share-your-rules-for-ai/2377/3 | |
| # Original original instructions: https://x.com/NickADobos/status/1814596357879177592 | |
| You are an expert AI programming assistant that primarily focuses on producing clear, readable SwiftUI code. | |
| You always use the latest version of SwiftUI and Swift, and you are familiar with the latest features and best practices. | |
| You carefully provide accurate, factual, thoughtful answers, and excel at reasoning. | |
| - Follow the user’s requirements carefully & to the letter. |
| <%= form_with(model: team) do |form| %> | |
| <div> | |
| <%= form.label :name %> | |
| <%= form.text_field :name, class: "input" %> | |
| </div> | |
| <div> | |
| <%= f.select :user_id, {}, {placeholder: "Select user"}, {class: "w-full", data: { controller: "select", select_url_value: users_path }} %> | |
| </div> |
Basecamp's new book Shape Up is now available online (https://basecamp.com/shapeup) to read page-by-page.
There is a .pdf version, but that's not the best format for Kindle / other eReaders. Instead, we can convert the page-by-page into an eReader friendly format.
NOTE: This has only been tested on Chrome
| default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
| default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
| default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
Part of a lesson for the Stanford Journalism Computational Methods in the Civic Sphere
This is a short tutorial on how to use command-line tools, including csvfix and t, the command-line Twitter interface, to access and parse data from the Sunlight Foundation and Twitter. The end goal of this exercise is to gather who everyone in Congress follows (friends, in the parlance of Twitter), and then count up the common friends to find out which Twitter accounts are most followed by members of Congress.
Here's a screenshot of the result, after it's been imported into [Google Spreadsheets](https://docs.google.com/spreadsheets/d/1cjRJyrPYj8KAhUrot8ubPOWgbAwm0OqIgPtsswJ2sjM/edit#gid=1358907576
| require "csv" | |
| def csv_headers | |
| ["Your", "Headers", "Here"] | |
| end | |
| files = Dir["file_names_*.csv"].sort_by { |f| "if you want to sort the files" } | |
| file_contents = files.map { |f| CSV.read(f) } | |
| csv_string = CSV.generate do |csv| |
| # Simple example of aes-256-cbc encryption for Ruby/Rails to encrypt URL params (or any text) | |
| require 'openssl' | |
| require 'base64' | |
| require 'uri' | |
| plaintext = 'id=example_id&user_id=the_user_id&username=voxtrot&user_first_name=john&user_last_name=doe&user_image=http://i1.nyt.com/images/misc/nytlogo379x64.gif' | |
| # |
| class ActiveRecord::Base | |
| def self.import!(record_list) | |
| raise ArgumentError "record_list not an Array of Hashes" unless record_list.is_a?(Array) && record_list.all? {|rec| rec.is_a? Hash } | |
| return record_list if record_list.empty? | |
| (1..record_list.count).step(1000).each do |start| | |
| key_list, value_list = convert_record_list(record_list[start-1..start+999]) | |
| sql = "INSERT INTO #{self.table_name} (#{key_list.join(", ")}) VALUES #{value_list.map {|rec| "(#{rec.join(", ")})" }.join(" ,")}" | |
| self.connection.insert_sql(sql) |