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
load("//junit5.bzl", "java_junit5_test") | |
java_junit5_test( | |
# ... | |
main_class = "com.flexport.bazeljunit5.BazelJUnit5ConsoleLauncher", | |
deps = [ | |
"//bazeljunit5/src/main/java/com/flexport/bazeljunit5", | |
# ... | |
] | |
) |
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
bazel run //*:test "--test_filter=com.package.EnvTest#testEnv" | |
# or right click on a single test in a `*Test.java` file and and select "Run ..." in your IDE (e.g. IntelliJ IDEA) |
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
// http://nikhilm.github.io/uvbook/threads.html | |
#include <string> | |
#include <map> | |
#include <node.h> | |
#include <v8.h> | |
#include <uv.h> | |
#include <sys/syscall.h> | |
#include <stdlib.h> |
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
gtk_icon_sizes="panel_menu=16,16:panel=16,16:gtk_menu=12,12:gtk_small_toolbar=16,16:gtk_large_toolbar=16,16:gtk_button=16,16:gtk_dialog=16,16:gtk_dnd=16,16" | |
style"gtkcompact"{ | |
# font_name="Sans9" | |
GtkButton::default_border={0,0,0,0} | |
GtkButton::default_outside_border={0,0,0,0} | |
GtkButton::child_displacement_x=1 | |
GtkButton::child_displacement_y=1 | |
GtkButtonBox::child_min_height=20 | |
GtkButtonBox::child_min_width=80 | |
GtkButtonBox::child_internal_pad_x=0 |
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
include $(GOROOT)/src/Make.inc | |
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4 | |
all: | |
$(GC) jsontest.go | |
$(LD) -o jsontest.out jsontest.$O | |
format: | |
$(GOFMT) -w jsontest.go |
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
var Sequelize = require('sequelize'); | |
var sequelize = new Sequelize('db', 'user', 'pass', { | |
dialect: 'mysql', | |
pool: { | |
maxConnections: 5, | |
maxIdleTime: 30 | |
} | |
}); | |
var User = sequelize.define("User", { |
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
// server | |
var net = require('net'); | |
var HOST = '127.0.0.1'; | |
var PORT = 6969; | |
// Create a server instance, and chain the listen function to it | |
// The function passed to net.createServer() becomes the event handler for the 'connection' event | |
// The sock object the callback function receives UNIQUE for each connection | |
net.createServer(function(sock) { |
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
function Person(id, name) { | |
this.id = id; | |
this.name = name; | |
this.toString = function() { | |
return "" + this.id + ": " + this.name; | |
} | |
var test = function() { | |
alert(123); |
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
"123".getBytes | |
val md = java.security.MessageDigest.getInstance("MD5") | |
md.update("d123".getBytes) | |
md.digest() | |
val md5 = org.apache.commons.codec.binary.Hex.encodeHex(res) | |
new String(md5) |
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
### start server | |
```sh | |
sudo mongod --reset --replSet replsetname --dbpath dbfilepath --port serverport --keyFile authkeyfile --auth | |
``` | |
### show config | |
```javascript | |
rs.conf() | |
``` |
NewerOlder