Skip to content

Instantly share code, notes, and snippets.

@vck
vck / docker-compose.yml
Created March 14, 2024 12:24 — forked from ScriptBytes/docker-compose.yml
Docker compose file and example docker run command for my youtube video: https://youtu.be/gFjpv-nZO0U
version: '3.8'
services:
mongo:
image: mongo:7.0
environment:
MONGO_INITDB_ROOT_USERNAME: mongadmin
MONGO_INITDB_ROOT_PASSWORD: LikeAndSubscribe
ports:
- 27017:27017
volumes:
"""
nama_orang = "Guido"
print(nama_orang)
nama_orang_lengkap = nama_orang + " van Rosum"
print(nama_orang_lengkap)
# luas_lingkaran = phi * r ** 2
phi = 3.14
@vck
vck / keychron_linux.md
Created November 19, 2021 03:41 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux (+ Bluetooth fixes)

Here is the best setup (I think so :D) for Keychron + Linux

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

In order to change this, you need to change the fnmode parameter for the hid_apple kernel module. Here's some documentation on it, but a quick summary can be found below:

@vck
vck / retrain-object-detection_ssd_mobilenetv2.ipynb
Created September 15, 2021 13:46 — forked from KostaMalsev/retrain-object-detection_ssd_mobilenetv2.ipynb
Retrain-Object-Detection_ssd_mobilenetv2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vck
vck / nginxproxy.md
Created August 10, 2021 08:20 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@vck
vck / setup-mysql.sh
Created June 24, 2021 16:53 — forked from sheikhwaqas/setup-mysql.sh
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@vck
vck / git-deployment.md
Created June 11, 2021 10:23 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@vck
vck / gist:833d4cf9083d9c90b7ffbed28700d01d
Created March 13, 2021 13:42 — forked from bigsnarfdude/gist:d811e31ee17495f82f10db12651ae82d
[boundingBox] opencv example python - Contours – bounding box, minimum area rectangle, and minimum enclosing circle
import cv2
import numpy as np
# read and scale down image
# wget https://bigsnarf.files.wordpress.com/2017/05/hammer.png #black and white
# wget https://i1.wp.com/images.hgmsites.net/hug/2011-volvo-s60_100323431_h.jpg
img = cv2.pyrDown(cv2.imread('2011-volvo-s60_100323431_h.jpg', cv2.IMREAD_UNCHANGED))
# threshold image
ret, threshed_img = cv2.threshold(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY),
@vck
vck / centroidtracker.py
Created March 9, 2021 17:45 — forked from adioshun/centroidtracker.py
Simple object tracking with OpenCV
# https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/
# import the necessary packages
from scipy.spatial import distance as dist
from collections import OrderedDict
import numpy as np
class CentroidTracker():
def __init__(self, maxDisappeared=50):
# initialize the next unique object ID along with two ordered

#Wireless Penetration Testing Cheat Sheet

##WIRELESS ANTENNA

  • Open the Monitor Mode
root@uceka:~# ifconfig wlan0mon down
root@uceka:~# iwconfig wlan0mon mode monitor
root@uceka:~# ifconfig wlan0mon up