start new:
tmux
start new with session name:
tmux new -s myname
| def result_handler(result) | |
| case result | |
| when Success, Some | |
| puts 'success, user created' | |
| when Failure { |message, _| message == :http_error } | |
| puts "HTTP request error, #{result.failure[2]}" | |
| when Failure { |message, _| message == :validation_error } | |
| puts "validation error, #{result.failure[2]}" | |
| when Failure(ROM::Error) | |
| puts 'User not created' |
| /* | |
| (c) by Thomas Konings | |
| Random Name Generator for Javascript | |
| */ | |
| function capFirst(string) { | |
| return string.charAt(0).toUpperCase() + string.slice(1); | |
| } | |
| function getRandomInt(min, max) { |
| package main | |
| import ( | |
| "github.com/gorilla/rpc" | |
| "github.com/gorilla/rpc/json" | |
| "net/http" | |
| ) | |
| type HelloArgs struct { | |
| Who string |
| from celery import chain | |
| from django.core.management.base import BaseCommand | |
| from . import tasks | |
| class Command(BaseCommand): | |
| def handle(self, *args, **kwargs): |
| name "sshserver" | |
| description "Configures SSH and enables SFTP" | |
| run_list( | |
| "recipe[openssl::default]", | |
| "recipe[openssh]", | |
| ) | |
| default_attributes( | |
| "openssh" => { | |
| "server" => { | |
| "subsystem" => "sftp /usr/lib/openssh/sftp-server" # path for Ubuntu; ymmv |