- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
| CREATE TABLE posts ( | |
| id BIGINT NOT NULL PRIMARY KEY, | |
| name VARCHAR(255), | |
| title VARCHAR(255), | |
| content VARCHAR(255), | |
| timestamps timestamp | |
| ); | |
| CREATE GENERATOR POSTS_SEQ; |
| $BASE_PATH = File.expand_path(File.dirname(__FILE__) + '/..') | |
| # also find your own gem files for the executable | |
| $LOAD_PATH.unshift($BASE_PATH + '/lib') | |
| require 'bundler' | |
| ENV["BUNDLE_GEMFILE"] = $BASE_PATH + '/Gemfile' | |
| Bundler.require(:default) |
| # run with: rvmsudo god -c /srv/phone/phonzy/current/ahn/config/god/adhearsion.god | |
| # debug with: rvmsudo god quit && rvmsudo god -c /srv/phone/phonzy/current/ahn/config/god/adhearsion.god -D | |
| @deploy_path = '/srv/phone/phonzy' | |
| @shared_path = File.join @deploy_path, 'shared' | |
| @app_path = File.join @deploy_path, 'current', 'ahn' | |
| @log_path = File.join @shared_path, 'log' | |
| @pid_path = File.join @shared_path, 'pids' | |
| @pid_file = File.join @pid_path, 'adhearsion.pid' | |
| @god_env = YAML.load_file("#{@shared_path}/config/god_environment.yml") |
| def check_s_client | |
| server = 'Generel Settings: ' | |
| renegotiation = 'Insecure Renegotiation'.colorize(:red) | |
| crime = 'SSL Compression Enabled <= CRIME - CVE-2012-4929'.colorize(:red) | |
| results = %x(echo "q" | openssl s_client -host #{@server} -port #{@port} 2> /dev/null) # why ? | |
| case results.downcase | |
| when 'secure renegotiation is supported' | |
| renegotiation = 'Secured Renegotiation'.colorize(:green) | |
| when 'compression: none' |
| require 'rubygems' | |
| require 'ffi' | |
| module SSHSocket | |
| extend FFI::Library | |
| ffi_lib_flags :now, :global | |
| ffi_lib 'libssh' | |
| attach_function :ssh_init, [], :int | |
| attach_function :ssh_bind_new, [], :pointer |
| package main | |
| import "fmt" | |
| import "unicode/utf16" | |
| import "unicode/utf8" | |
| import "bytes" | |
| func main() { | |
| b := []byte{ |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net" | |
| "github.com/milosgajdos83/tenus" | |
| ) |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net" | |
| "github.com/milosgajdos83/tenus" | |
| ) |