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
| # This is an startup script example, how IPv6 should | |
| # looks like, if not you will get some seriously | |
| # problems. | |
| # Some options may not work on your OS. | |
| # ICMPv6 Stastics (optional) | |
| # icmpv6_stats | |
| # Optional may not work on all systems | |
| ipset flush dns6 |
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
| connection = Faraday::Connection.new('http://example.com') do |builder| | |
| builder.request :url_encoded # for POST/PUT params | |
| builder.adapter :net_http | |
| end | |
| # same as above, short form: | |
| connection = Faraday.new 'http://example.com' | |
| # GET | |
| connection.get '/posts' |
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
| require 'openssl' | |
| require 'Base64' | |
| key = "secret-key" | |
| data = "some data to be signed" | |
| Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha256'), key, data)).strip() |
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
| sudo qemu-kvm -net tap,script=/bin/true -net nic,model=virtio -drive if=virtio,file=openwrt-x86-kvm_guest-combined-ext4.img -sdl |
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
| # Copy and paste this to the rails console to test your email settings | |
| class MyMailer < ActionMailer::Base | |
| def test_email | |
| @recipients = "[email protected]" | |
| @from = "[email protected]" | |
| @subject = "test from the Rails Console" | |
| @body = "This is a test email" | |
| end | |
| end |