Skip to content

Instantly share code, notes, and snippets.

View FrankHassanabad's full-sized avatar
🎧
Eat Sleep Code Repeat

Frank Hassanabad FrankHassanabad

🎧
Eat Sleep Code Repeat
  • https://radicl.com/
  • Boulder, Co
View GitHub Profile
@FrankHassanabad
FrankHassanabad / bathroom-correction-at-work.py
Created June 20, 2018 00:44
Correction fo prime numbers
import math
# This as written will fail saying 1 and 4 are prime.
# Those two numbers are not prime.
# Also, checking up to square root is more efficient.
def IsPrime(n):
if (n == 1 or n == 4):
return False
for divisor in range(2, int(math.ceil(math.sqrt(n)))):
if n % divisor == 0:
@FrankHassanabad
FrankHassanabad / medium_non_optimal_ui.sh
Created July 27, 2018 14:45
For Medium Article (Non Optimal UI)
...
2018-07-25T09:55:09.851-06:00 [INFO] [test_application] setting to
...
@FrankHassanabad
FrankHassanabad / medium_non_optimal_ui_2.sh
Created July 27, 2018 14:48
For Medium Article (Non Optimal UI/UX)
...
018-07-26T10:08:14.055-06:00 [INFO] [test_application] The parameter is incorrect
(application crashes)
...
@FrankHassanabad
FrankHassanabad / medium_non_optimal_ui_3.sh
Last active July 27, 2018 14:52
For Non Optimal UI/UX medium article
http://localhost:8500/v1/kv/?recurse&pretty=true
...
{
"LockIndex": 0,
"Key": "application/configs/",
"Flags": 0,
"Value": null, <-- Wait, what's this null?
"CreateIndex": 73975,
"ModifyIndex": 73975
@FrankHassanabad
FrankHassanabad / rust_futures_examples.rs
Last active July 29, 2018 01:49
Rust futures examples
extern crate futures;
use futures::{future, Future};
use std::*;
/// Returns an empty future, empty error
fn return_empty_result() -> impl Future<Item = (), Error = ()> {
future::lazy(|| future::ok::<(), ()>(()))
}

Keybase proof

I hereby claim:

  • I am frankhassanabad on github.
  • I am frankhassanabad (https://keybase.io/frankhassanabad) on keybase.
  • I have a public key ASCNJL2XvQ2jA2QIWsLLIbAz1Loxl3DzoUlhZ6TaFZDFjQo

To claim this, I am signing this object:

@FrankHassanabad
FrankHassanabad / aliases.sh
Last active January 10, 2019 16:48
Helpful aliases I use for kibana
export PLUGIN_NAME=secops
# Start kibana
alias start-kibana='cd $HOME/projects/kibana && yarn start --no-base-path'
# Start bootstrap
alias start-bootstrap='cd $HOME/projects/kibana && yarn kbn bootstrap'
# Start typecheck
alias start-type-check='cd $HOME/projects/kibana && node scripts/type_check.js'
#
# Full text queries
#
# Match all
GET /auditbeat-*/_search
{
"query": {
"match_all": {}
}
@FrankHassanabad
FrankHassanabad / output.txt
Created April 22, 2019 11:34
Run Tests Repeatedly
running test for the 1 time with total 0 errors so far
running test for the 2 time with total 0 errors so far
running test for the 3 time with total 0 errors so far
running test for the 4 time with total 0 errors so far
running test for the 5 time with total 0 errors so far
running test for the 6 time with total 0 errors so far
running test for the 7 time with total 0 errors so far
running test for the 8 time with total 0 errors so far
running test for the 9 time with total 0 errors so far
running test for the 10 time with total 0 errors so far
@FrankHassanabad
FrankHassanabad / url-notes.txt
Created June 17, 2019 04:39
Links for ML jobs examples
## Generic links from ML back to SIEM Application
#
# Several tests runs with each and adding/removing
# them to see which ones were effective
#
Network Overview Links
---
# Network Overview By User Name (KQL Query: user.name $user.name$)