Skip to content

Instantly share code, notes, and snippets.

@tdnam
tdnam / 1000.ino
Created July 21, 2017 08:37
ENGG1000
#include <AFMotor.h>
AF_DCMotor Motor1(1);
AF_DCMotor Motor2(4);
void setup()
{
}
@tdnam
tdnam / findAndKillProcess.txt
Created October 7, 2019 09:01
Find and kill process
#macos
sudo lsof -i tcp:8080
sudo kill -9 PID
#windows
netstat -ano | findstr 8080
taskkill /F /PID PID
@tdnam
tdnam / docker_commands.txt
Last active February 6, 2020 01:38
Docker Commands
docker-compose pull: to retrive the lastest workstation images
docker-compose up -d: to start the containers. The -d argument starts the containers in the background.
docker exec -it {container_name} bash: to connect a container by name
docker build -t {image_name} . : build image
docker ps -a --filter status=exited --format {{.ID}} | xargs docker rm: remove exited containers
inspec init profile {profile_name}
@tdnam
tdnam / transfer_files.txt
Last active February 18, 2020 05:51
Transfer file
Target to local: scp -r stinky@192.168.56.105:/home/stinky/Documents/derpissues.pcap /home/kali/
jmeter -n -t test.jmx -l testresult.jtl
-n: non gui mode
-t: jmx file
-l: result logs
conda create --name my_env python
source activate my_env
source deactivate
# TRANSFORMATION EXAMPLE
from sklearn.preprocessing import PowerTransformer
plt.hist(data.B)
power = PowerTransformer()
b_trans = power.fit_transform(data)
plt.hist(b_trans)
This .gitignore file is intended to be used when version controlling VuGen
# scripts. It excludes files that are not needed for script replay or
# regeneration.
# Note: This has not been tested with all vuser types.
#
# A copy of this .gitignore file is maintained at
# https://www.myloadtest.com/loadrunner-gitignore/
# C-based VuGen scripts have the following structure:
#
/* Update values of requestName & dataSourceName below accordingly */
String requestName = 'POST request'
/*----------------------------------------------------------------*/
def requestStep = testRunner.testCase.getTestStepByName(requestName)
def response = context.expand( '${${requestName}#Response}' )
def request = requestStep.getHttpRequest().getResponse().getURL()
def headers = requestStep.testRequest.response.getResponseHeaders()
def envi = testRunner.getTestCase().getTestSuite().getProject().getActiveEnvironment().name
def assertions = requestStep.getAssertionList()
def rawRequest = context.expand( '${${requestName}#RawRequest}' ) //-- uncomment if request has body