Skip to content

Instantly share code, notes, and snippets.

{{7*'7'}}
import requests
from bs4 import BeautifulSoup
import time
import random
import sys
url = "http://ec2-35-162-109-117.us-west-2.compute.amazonaws.com/"
def get_token(response_text):
soup = BeautifulSoup(response_text, 'lxml')
csrf_token = soup.select_one('input[name="csrf_token"]')['value']
Date Germany United Arab Emirates India Italy Sweden Spain Switzerland Ireland Qatar Saudi Arabia Washington New York California Hubei Iran Korea South France Shanghai Hong Kong Taiwan*
1/22/20 0 0 0 0 0 0 0 0 0 0 0 0 0 444 0 1 0 9 0 1
1/23/20 0 0 0 0 0 0 0 0 0 0 0 0 0 444 0 1 0 16 2 1
1/24/20 0 0 0 0 0 0 0 0 0 0 0 0 0 549 0 2 2 20 2 3
1/25/20 0 0 0 0 0 0 0 0 0 0 0 0 0 761 0 2 3 33 5 3
1/26/20 0 0 0 0 0 0 0 0 0 0 0 0 0 1058 0 3 3 40 8 4
1/27/20 1 0 0 0 0 0 0 0 0 0 0 0 0 1423 0 4 3 53 8 5
1/28/20 4 0 0 0 0 0 0 0 0 0 0 0 0 3554 0 4 4 66 8 8
1/29/20 4 4 0 0 0 0 0 0 0 0 0 0 0 3554 0 4 5 96 10 8
1/30/20 4 4 1 0 0 0 0 0 0 0 0 0 0 4903 0 4 5 112 10 9
#!/bin/sh
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
@vishnuvp
vishnuvp / osquery.conf
Last active October 14, 2020 15:07
Sample osquery conf
{
"options": {
"config_plugin": "filesystem",
"logger_plugin": "filesystem,syslog",
"logger_path": "/var/log/osquery",
"logger_snapshot_event_type": "true",
"disable_logging": "false",
# "log_result_events": "true",
"logger_event_type": "true",
"schedule_splay_percent": "10",
@vishnuvp
vishnuvp / kube-dashboard.md
Created April 25, 2019 13:53
Enable Kubernetes Dashboard on Docker for mac
@vishnuvp
vishnuvp / node-gyp-fix.md
Created February 7, 2019 16:41
node-gyp rebuild fails in MacOS

node-gyp rebuild fails in Mac OS running xcode>=10.x This is because xcode has removed support for libstdc++ Add CXXFLAGS and LDFLAGS to require minimum Mac OS version.

CXXFLAGS="-mmacosx-version-min=10.9" LDFLAGS="-mmacosx-version-min=10.9" nvm install
@vishnuvp
vishnuvp / letsgo
Last active February 6, 2019 09:45
letsgo to quick start a go project: https://github.com/golang-standards/project-layout
#!/bin/bash
# Follows https://github.com/golang-standards/project-layout
project=$1
mkdir $project
mkdir $project/cmd
mkdir $project/internal
mkdir $project/pkg
mkdir $project/vendor
@vishnuvp
vishnuvp / homoiconic-clojure
Created February 1, 2019 08:43
Clojure is homoiconic
user=> (+ 1 1)
2
user=> (defn to-word [symbol]
#_=> (case symbol
#_=> + `plus
#_=> 1 `one
#_=> 2 `two
#_=> 3 `three
#_=> 4 `four
#_=> 5 `five
@vishnuvp
vishnuvp / java-clojure-interop.md
Last active January 29, 2019 13:17
Java - Clojure Interop

This Java class will act as a wrapper class for a clojure project. The clojure jar should be available in the namespace. This require clojure version >1.6

...
public class JavaSide {
    private final IFn clojureApiHandlerFn;
    
    public JavaSide() {
        new clojure.lang.RT();
        
 /* Import clojure core. */