sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo reboot
This file contains 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
package controllers; | |
public class Application extends Controller { | |
// in cache during 1800 seconds (30 min) | |
@Cached(key = "pagingList", duration = 1800) | |
public static Result index(Integer page) { | |
String uuid = session("uuid"); | |
if (uuid == null) { | |
uuid = java.util.UUID.randomUUID().toString(); |
This file contains 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
# lib/tasks/deploy.rake | |
namespace :deploy do | |
desc 'Deploy to staging environment' | |
task :staging do | |
exec 'mina deploy -f config/deploy/staging.rb' | |
end | |
end |
This file contains 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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains 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
require 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
require 'mina/rbenv' # for rbenv support. (http://rbenv.org) | |
# require 'mina/rvm' # for rvm support. (http://rvm.io) | |
# Basic settings: | |
# domain - The hostname to SSH to. | |
# deploy_to - Path to deploy into. | |
# repository - Git repo to clone from. (needed by mina/git) |
This file contains 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
require 'bundler/setup' | |
require 'active_record' | |
include ActiveRecord::Tasks | |
db_dir = File.expand_path('../db', __FILE__) | |
config_dir = File.expand_path('../config', __FILE__) | |
DatabaseTasks.env = ENV['ENV'] || 'development' |
This file contains 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 Where | |
class <<self | |
attr_accessor :editor | |
def is_proc(proc) | |
source_location(proc) | |
end | |
def is_method(klass, method_name) | |
source_location(klass.method(method_name)) |
- Básico: Complexidade: (https://en.wikipedia.org/wiki/Time_complexity)
- How Quantum Computers Break Encryption | Shor's Algorithm Explained (https://www.youtube.com/watch?v=lvTqbM5Dq4Q)
- How to Make Sense of Google’s Quantum Supremacy Claim (https://www.extremetech.com/extreme/300987-googles-quantum-supremacy-paper-tldr-edition)
- The Extreme Physics Pushing Moore’s Law to the Next Level (https://www.youtube.com/watch?v=f0gMdGrVteI)
- Graphene Processors and Quantum Gates (https://www.youtube.com/watch?v=VLPpDoMBVK0)
- How Quantum Computers Break Encryption | Shor's Algorithm Explained (https://www.youtube.com/watch?v=lvTqbM5Dq4Q)
- How Shor's Algorithm Factors 314191 (https://www.youtube.com/watch?v=FRZQ-efABeQ)
- How Does a Quantum Computer Work? (https://www.youtube.com/watch?v=g_IaVepNDT4)
- What is Quantum Mechanical Spin? (https://www.youtube.com/watch?v=v1_-LsQLwkA)
- Secret Key Exchange (Diffie-Hellman) - Computerphile (https://www.youtube.com/watch?v=NmM9HA2MQGI)
This file contains 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
// Advanced SwiftUI Transitions | |
// https://swiftui-lab.com | |
// https://swiftui-lab.com/advanced-transitions | |
import SwiftUI | |
struct CrossEffectDemo: View { | |
let animationDuration: Double = 2 | |
let images = ["photo1", "photo2", "photo3", "photo4"] | |
@State private var idx = 0 |