Skip to content

Instantly share code, notes, and snippets.

View skate056's full-sized avatar

Saket Kumar skate056

  • London
View GitHub Profile
@neilzone
neilzone / deloldtweets.py
Last active March 21, 2021 13:57 — forked from n-eq/deloldtweets.py
Delete old tweets based on twitter archive
#!/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
@Prakasaka
Prakasaka / bash-colors.md
Created July 25, 2020 09:14 — forked from JBlond/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

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
---
- 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?
/////////////////////
//
@mitchwongho
mitchwongho / Docker
Last active November 29, 2023 06:36
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@Sumbera
Sumbera / README.md
Last active August 21, 2019 03:54
Many points with d3 and leaflet

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

@k3karthic
k3karthic / truncate_dynamodb.sh
Last active July 12, 2022 18:56
Truncate all keys in a dynamodb table
#!/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" }}'