We will use minimalistic Linux distribution called Alpine (5MB)
FROM alpine:latest
RUN apk --update add redis
Producer | |
Setup | |
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1 | |
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3 | |
Single thread, no replication | |
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196 |
error_page 500 /500.html; | |
location /500.html{ | |
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}'; | |
} | |
error_page 502 /502.html; | |
location /502.html{ | |
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}'; | |
} |
86937 isset | |
43159 echo | |
31697 empty | |
29252 substr | |
26146 count | |
24248 is_array | |
22572 strlen | |
19365 sprintf | |
18090 unset | |
16584 str_replace |
package main | |
import ( | |
"errors" | |
"fmt" | |
"golang.org/x/oauth2" | |
"golang.org/x/oauth2/jwt" | |
storage "google.golang.org/api/storage/v1" | |
"os" | |
) |
<?php | |
namespace League\Skeleton; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Routing\Router; | |
class SkeletonServiceProvider extends ServiceProvider | |
{ | |
/** |
var withProperty = [], els = document.getElementsByTagName('a'), i = 0; | |
for (i = 0; i < els.length; i++) { | |
if (els[i].hasAttribute('data-user_id')) { | |
ajaxObject = new XMLHttpRequest(); | |
ajaxObject.open("POST", "/ajax/user/karma/vote/", true); | |
ajaxObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | |
ajaxObject.send('user=' + els[i].getAttribute('data-user_id') + '&karma_value=' + 2 + '&csrf_token=' + encodeURIComponent(globals.user.csrf_token)); | |
} | |
} |
_log_pskb(date_created,link_id,logname,log) | |
account(id,uid,sum) | |
account_attach(account_id,file_id,name,orig_name) | |
account_transaction(user_id,yd) | |
activate_service(code,email,data) | |
admin_log_users(user_id,log_id,last_comment_view) | |
annoy(ip,last_req) | |
articles(title,short,msgtext,sign,logo,link) | |
articles_comments(from_id,parent_id,from_ip,created_time,article_id,msgtext,youtube_link) | |
articles_comments_files(comment_id,file_id,small,inline,temp) |
<?php | |
abstract class AbstractEntity extends AbstractValueObject | |
{ | |
/** | |
* Offset Set | |
* | |
* @param mixed $offset | |
* @param mixed $value | |
* |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |