Skip to content

Instantly share code, notes, and snippets.

View aug2uag's full-sized avatar

Reza Fatahi aug2uag

  • Los Angeles, CA
View GitHub Profile
@aug2uag
aug2uag / deletallbuilds.gvy
Created August 14, 2020 07:22
Jenkins delete all builds
def jobName = "copy_folder"
def job = Jenkins.instance.getItem(jobName)
job.getBuilds().each { it.delete() }
job.nextBuildNumber = 1
job.save()
@aug2uag
aug2uag / systems.py
Last active August 9, 2020 21:36
system monitoring
import psutil
# main function
def sysStats():
agg = {}
agg['posix_processes'] = _posixProcesses()
agg['windows_processes'] = _windowsProcesses()
agg['battery_info'] = _batteryInfo()
agg['cpu_info'] = _cpuInfo()
agg['mem_info'] = _memInfo()
@aug2uag
aug2uag / Dockerfile
Created July 22, 2020 17:40
Cobra Dockerfile
FROM ubuntu:focal
RUN apt -y update && \
apt -y upgrade && \
apt-get -y install git build-essential bison && \
git clone https://github.com/nimble-code/Cobra.git && \
cd Cobra/src && \
make install_linux && \
cd .. && \
d=$(pwd) && \
@aug2uag
aug2uag / Dockerfile
Created July 8, 2020 18:40
Ghidra on radare2 Dockerfile with Python binding to r2pipe
# r2-ghidra-docker
# ================
#
# Requires 2.5GB of free disk space
#
# Using debian 9 as base image.
FROM debian:9
# Label base
@aug2uag
aug2uag / files.py
Created April 23, 2020 10:41
nested directory create Python3
from pathlib import Path
import os
x = {
'main': {
'header': None,
'splash': None,
'staticlayout': None,
'boardslayour': None,
'search': None,
@aug2uag
aug2uag / gist:a046261e14b5ee2887db084ea7f70125
Last active April 19, 2020 01:16
FTP on POSIX with curl
curl -T my-local-file.txt ftp://ftp.example.com --user user:secret
@aug2uag
aug2uag / Setup & Install
Created November 5, 2019 08:45 — forked from dhavaln/Setup & Install
Setting up HAProxy on Mac OSX
Install HAProxy from Homebre:
`brew install haproxy`
For full reference:
https://serversforhackers.com/load-balancing-with-haproxy
@aug2uag
aug2uag / singleton.go
Created November 5, 2019 08:41 — forked from adohe-zz/singleton.go
Golang singleton implementation
package singleton
import (
"sync"
)
type singleton struct {
}
var instance *singleton

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@aug2uag
aug2uag / gist:c2d96d87d212277925492ce5edd5d8f1
Created September 24, 2019 23:48
wealthiest cities list
atherton, california
scarsdale, new york
cherry hills village, colorado
los altos hills, california
hillsborough, california
short hills, new jersey
highland park, texas
darien, connecticut
bronxville, new york
glencoe, illinois