Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
#!/bin/python3 | |
# Fork of https://gist.github.com/davej/113241 | |
# Requirements: | |
# - twitter API credentials (replace the correponding variables) | |
# - tweet.js file you get by extracting your twitter archive zip file (located in data/) | |
# License : Unlicense http://unlicense.org/ | |
import tweepy | |
import pytz | |
import json |
--- | |
- hosts: localhost | |
connection: local | |
become: true | |
vars: | |
- google_file: /etc/apt/sources.list.d/google-chrome.list | |
tasks: | |
- name: base deps | |
apt: name={{ item }} update_cache=yes | |
with_items: |
Recently, I use JMXterm to collect info about Java JVM via JMX and MBeans. Here is a short note. | |
- Download JMXterm | |
https://sourceforge.net/projects/cyclops-group/files/jmxterm/1.0.0/jmxterm-1.0.0-uber.jar/download | |
- Run JMXterm | |
java -jar jmxterm-1.0.0-uber.jar --url localhost:<jmx listen port> | |
- All MBeans from java.lang | |
$>domain java.lang |
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
Testing SVG limits of plotting points on map using D3, Leaflet following this base sample: http://bost.ocks.org/mike/leaflet. However instead of scaling SVG in deep zooms, I am using Enter/Update/Exit pattern from D3 to dynamically update points on map. This has been prototyped also here http://bl.ocks.org/sumbera/9972460 with brushing of 100T points.
For zooming out (causing all points to be displayed), I am filtering out points that can't be effectively visible, thus reducing number of points in SVG. (check console for log output).
This sample is using real data of 24T coordinates, with this points are clustered around cities, rather than artifically randomized. Real number of rendered points / removed points can be seen in console.log
#!/bin/bash | |
TABLE_NAME=$1 | |
# Get id list | |
aws dynamodb scan --table-name $TABLE_NAME | grep ID | awk '{ print $2 }' > /tmp/truncate.list | |
# Delete from id list | |
cat /tmp/truncate.list | xargs -IID aws dynamodb delete-item --table-name $TABLE_NAME --key '{ "id": { "S": "ID" }}' |