Sunday, April 01, 2018
$ sudo npm install -g create-react-native-app
$ create-react-native-app lemar
$ sudo sysctl -w fs.inotify.max_user_instances=1024
$ sudo sysctl -w fs.inotify.max_user_watches=12288
install the expo app on mobile and open it, then run
$ cd lemar
$ npm start
and follow instructions, you should able to have a live reload development environment to code with react native, basicially it's all javascript
when you want to build the binary, .apk
for example, run
$ exp build:android
you'll need an expo account to continue, usually I don't register accounts for development tools, but I don't want to build binary on my old laptop ...
the build process is quite slow, take about 15 minutes for my quick project.
but it works and the whole experience is good.
next I will try their Using ClojureScript guide
Monday, April 02, 2018
cloudflare is Announcing 1.1.1.1: the fastest, privacy-first consumer DNS service
my colleague told me one fun fact about 1.0.0.1
: you can just use 1.1
same as 127.0.0.1
, you can just use 127.1
, and
0
for 0.0.0.0
(in my machine resolve to 127.0.0.1
)
the detailed answer can be found in inet_aton() man page:
a.b
Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class C network addresses.
a
The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement.
Lambda Island has a really funny episode about ed
: 40. The Ultimate Dev Setup
I think I really like the idea and started practice with ed
:
$ rlwrap ed -p'> '
a
: insert mode (insert to buffer).
: exit insert modew [file]
: write to filef [file]
: set file, then can write simply usingw
e [file]
: edit file and set current file namep
: print current line1p
: print first line,p
: print all lines,n
: like,p
but shows line numbersd
: delete current line2d
: delete line 2,d
: delete all linesr [file]
: read file and append to bufferu
: undos/foo/bar/g
: substitution current line,s/foo/bar/g
: substitution all lines2
,2,3
,,
,?lin?
: print lines-
,+
,++
,-2
: move cursor up or down!grep n %
:!
: exec shell,%
: current file namew !clj
: pipe buffer to shell command
Saturday, April 14, 2018
combining ed
and less
can navigate and do minor update very fast.
first, add an environment variable LESSEDIT
, less
default uses vi
(or $VISUAL
, $EDITOR
), however it also passes +[line_num]
to the editor which is not valid for ed
so a simple way to fix is add to .bashrc
:
export LESSEDIT='rlwrap ed -p " >" %f'
%f
is the filename
in order to display line number under less
, type -N
to toggle
Sunday, April 15, 2018
I bought Ed Mastery and finished in 2 days.
The book is short but I like the writing style, I put my reading notes here
ed
itself doesn't support autocomplete, but rlwrap
does
just append -r
flag:
$ rlwrap -r ed -p "> " foo.txt
for filename completion, add -c
flag
then I found out you can have autocomplete under sqlite
, mysql
etc...
for mysql, start client with mysql --auto-rehash
Wednesday, April 18, 2018
Announcing GraalVM: Run Programs Faster Anywhere
more details on their official site
I tried it with some simple clojure program, it's amazing!
the compiled programs start fast like it's written in go
some failed to compile, I saw a trick on r/clojure:
$ native-image -cp `lein cp`:target/uberjar/hello-0.1.0-SNAPSHOT-standalone.jar hello.core
Wednesday, April 25, 2018
clojure:
saw this on r/clojure subreddit:
run gist directly from command line:
$ clojure -Sdeps '{:deps {hello-clojure {:git/url "https://gist.github.com/athos/b68b15b08efedffaf14d8c020b125202" :sha "1c9a05106171f97f9b8e8ac8f58c7bd8dbe021f9"}}}' -m hello-clojure
essentially a clojure playground
a nice summary on clojure build tools: All the Paths
another summary on what clojure can help you: How Clojure helps you build powerful abstractions
databases:
FoundationDB is Open Source, check their Technical Overview page
on the same day Oracle Announcing General Availability of MySQL 8.0
the cluster mode is interesting but I don't have time to dive in yet: MySQL InnoDB Cluster 8.0 – A Hands-on Tutorial
a story about entity-attribute-value data model (which datomic uses): A Massively Multi-user Datastore, Synced with Mobile Clients
two datomic article:
a quick datomic setup from r/clojure:
- Download
datomic.zip
, unzip - look at
transactor-dev.properties
and probably not do anything datomic/bin/transactor -Xmx1024m -Xms256m transactor-dev.properties
java -cp project.jar clojure.main
(or whatever)(d/connect "datomic:free://localhost:4334/my-db")
some other interesting tools/links:
- Gimel: PayPal’s Analytics Data Processing Platform
- Istio Smart Canary Launch: Easing Into Production (this is part of a series)
- SSH client configuration tricks
- Titus, the Netflix container management platform, is now open source
- Key Takeaway Points and Lessons Learned from QCon London 2018
- Getting Started With Common Lisp in 2018
about the last link: people said Portacle is easier to setup a fresh common lisp environment.
Thursday, April 26, 2018
some ssh config to speed up (for git pull
etc.)
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist 600
force the connection to be closed by using ssh $host -O exit
Blog Archive
- Newer Entries
- 2018 May
- 2018 June
- 2018 July
- 2018 August
- 2018 September
- 2018 October
- 2018 November
- 2018 December
- 2019 January
- 2019 February
- 2019 March
- 2019 April
- 2019 May
- 2019 July
- 2019 October
- 2019 November
- 2019 December
- 2020 August
- 2020 September
- 2020 October
- 2020 November
- 2020 December
- 2021 January
- 2021 February
- 2021 March
- 2021 April
- 2021 May
- 2021 June
- 2021 August
- 2021 September
- 2021 December
- 2022 March
- 2022 April
- 2022 May
- 2022 June
- 2022 July
- 2022 August
- 2022 September
- 2022 October
- 2022 November
- 2022 December
- 2023 January
- 2023 February
- 2023 March
- 2023 April
- 2023 July
- 2023 August
- 2023 September
- 2023 October
- 2023 November
- 2023 December
- 2024 January
- 2024 February
- 2024 March
- 2024 April
- 2024 May
- 2024 June
- 2024 August
- 2024 September
- 2024 October
- 2024 November
- Older Entries
- 2018 March
- 2018 February
- 2018 January
- 2017 December
- 2017 November
- 2017 October
- 2017 September
- 2017 August
- 2017 July
- 2017 June
- 2017 May
- 2017 April
- 2017 March
- 2017 February
- 2017 January
- 2016 December
- 2016 November
- 2016 October
- 2016 September
- 2016 August
- 2016 July
- 2016 June
- 2016 May
- 2016 April
- 2016 March
- 2016 February
- 2016 January
- 2015 December
- 2015 November
- 2015 October
- 2015 September
- 2015 August
- 2015 July
- 2015 June
- 2015 May
- 2015 April
- 2015 March
- 2015 February
- 2015 January
- 2014 December
- 2014 November
- 2014 October
- 2014 September
- 2014 August
- 2014 March
- 2014 February
- 2014 January
- 2013 December
- 2013 October
- 2013 July
- 2013 June
- 2013 May
- 2013 March
- 2013 February
- 2013 January
- 2012 December
- 2012 November
- 2012 October
- 2012 September
- 2012 August