(Serial port or com port? - Serial ports are often refered as COM ports. It is the same to be short. You can read abut it in the Wiki article )
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
/* | |
Basic idea is to create an inspector for exploring state of a D program from a console using Lua | |
to view and perhaps modify D state. You can then call this inspector either like a breakpoint by | |
just placing a call to it where you wish your code to stop, or implement something fancier so that | |
you can interrupt the code live from the debugging console or specify conditions that will lead to | |
a 'breakpoint'. (Perhaps annotate the functions that need to check if they need to call in to the | |
debugger, and conceivably have some kind of interprocess communication). | |
Also means you can log to a data structure rather than text file, and inspect the data structure in | |
a more precise and structured way via Lua |
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
# size of the buffer for storing unread stream tuples | |
tuple_buffer_blocks = 256MB # 128MB | |
# synchronization level for combiner commits; off, local, remote_write, or on | |
continuous_query_combiner_synchronous_commit = off | |
# maximum amount of memory to use for combiner query executions | |
continuous_query_combiner_work_mem = 1024MB | |
# maximum memory to be used by the combiner for caching; this is independent |
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
#!/bin/bash | |
tmp=$(mktemp -d) | |
pushd "$tmp" | |
iso=/Users/lloeki/Downloads/archlinux-2015.08.01-dual.iso | |
echo "fixing disk" | |
dd if=/dev/zero bs=2k count=1 of=tmp.iso | |
dd if=$iso bs=2k skip=1 >> tmp.iso | |
echo "mounting disk" |
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 lambda helps create workers that run in AWS’ Lambda service. | |
// The Lambda service is designed to run Node.js programs, so we have a very thin | |
// Node.js wrapper which is essentially an adapter between our Go worker programs | |
// and Lambda. Lambda runs our Node.js wrapper/adapter which then in turn runs | |
// our Go worker programs as child processes, communicating with them via stdio pipes | |
// and Unix exit codes. | |
// | |
// The interaction between the Lambda wrapper and our Go programs works like this: | |
// | |
// * The Node.js function is invoked by Lambda. Lambda passes an `event` parameter to |
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
# Basic Strongswan ikev2 server setup | |
* paltform: atlantic.net ubuntu 14.04 x64 | |
* the commands below are run with root account | |
## Strongswan | |
``` | |
apt-get install strongswan | |
apt-get install iptables iptables-persistent | |
``` |
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
require 'cherti/all' | |
include Cherti | |
def create_ad_url_override(user_id, ad_url, lang='ad') | |
device_types = ['mobile', 'tablet', 'pc'] | |
device_types.each do |dt| | |
AdUrl.find_or_create(:auth_provider => User[user_id].auth_provider, :device_type => dt, :lang => lang, :url => ad_url) | |
end | |
end |
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
require 'cherti/all' | |
include Cherti | |
def create_ad_url_override(user_id, ad_url, lang='ad') | |
device_types = ['mobile', 'tablet', 'pc'] | |
device_types.each do |dt| | |
AdUrl.find_or_create(:auth_provider => User[user_id].auth_provider, :device_type => dt, :lang => lang, :url => ad_url) | |
end | |
end |
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
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 |