snippets for bash_profile, mainly for servers with ssh access
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
[defaults] | |
inventory=hosts | |
vault_password_file=pass.txt |
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
use List::*; | |
enum List { | |
// Cons: Tuple struct that wraps an element and a pointer to the next node | |
Cons(u32, Box<List>), | |
// Nil: A node that signifies the end of the linked list | |
Nil, | |
} | |
// Methods can be attached to an enum |
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
use std::io; | |
use std::io::Write; | |
fn main() { | |
let s = read_string("aaa"); | |
println!("inputed {}", s); | |
} | |
fn read_string(comment: &str) -> String { | |
print!("{}", comment); |
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
import io.netty.bootstrap.ServerBootstrap; | |
import io.netty.buffer.Unpooled; | |
import io.netty.channel.Channel; | |
import io.netty.channel.ChannelFutureListener; | |
import io.netty.channel.ChannelHandlerContext; | |
import io.netty.channel.ChannelInboundHandlerAdapter; | |
import io.netty.channel.ChannelInitializer; | |
import io.netty.channel.ChannelPipeline; | |
import io.netty.channel.EventLoopGroup; |
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 tst; | |
import java.sql.*; | |
import java.util.concurrent.ArrayBlockingQueue; | |
import java.util.concurrent.BlockingQueue; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* Created by kudrale on 20.09.14. | |
*/ |