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
select @password:=PASSWORD('root'); | |
GRANT USAGE ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B'; | |
create database testa; | |
GRANT ALL PRIVILEGES ON `testa`.* TO 'root'@'%'; | |
flush privileges; | |
SET general_log = 1; |
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
echo "source $HOME/.cargo/env" >> ~/.bash_profile | |
source ~/.bash_profile |
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
package fs.lock; | |
import java.nio.ByteBuffer; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.concurrent.atomic.AtomicLong; | |
import java.util.concurrent.atomic.AtomicReference; | |
import java.util.concurrent.locks.ReentrantLock; | |
import java.util.stream.IntStream; | |
public class LockingOfByteBufferAllocation { |
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
package fs.memory; | |
import java.nio.ByteBuffer; | |
import java.util.*; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; | |
import java.util.concurrent.locks.Condition; | |
import java.util.concurrent.locks.ReentrantLock; | |
import java.util.stream.IntStream; |
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
package fs; | |
import org.apache.kafka.clients.producer.KafkaProducer; | |
import org.apache.kafka.clients.producer.ProducerRecord; | |
import org.joda.time.format.DateTimeFormat; | |
import org.joda.time.format.DateTimeFormatter; | |
import java.util.*; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; |
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
// https://www.ibm.com/developerworks/linux/library/j-zerocopy/ | |
package sendfile; | |
import java.io.DataOutputStream; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.net.Socket; | |
import java.net.UnknownHostException; | |
public class TraditionalClient { |
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
public class TestCurlProcess { | |
public static void main(String... args) throws Exception { | |
System.out.println("'-f' option exit code : " + execute("curl -f http://www.404.site")); // 6 | |
System.out.println("no option exit code : " + execute("curl http://www.404.site")); // 6 | |
System.out.println("-f option exit code : " + execute("curl -f http://localhost/force_error.php")); // 22 | |
System.out.println("no option exit code : " + execute("curl http://localhost/force_error.php")); // 0 | |
} | |
private static Integer execute(String cmd) throws Exception { |
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
public class Dummy { | |
private String name; | |
@HelloWorld | |
public String getName() { | |
return this.name; | |
} | |
public static void main(String... args) { |
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
redis-benchmark -n 1000000 -r 100000000 -h localhost -q -c 100 -p 6379 |
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
package freestrings.playground | |
public class ConvariantInjava { | |
class A { | |
} | |
class B extends A { | |
} |