Skip to content

Instantly share code, notes, and snippets.

@idriszmy
idriszmy / code.py
Last active April 20, 2024 10:41
Maker Pi RP2040 Mobile Robot: Part 2 - Line Following
#
# Maker Pi RP2040 Mobile Robot: Part 2 - Line Following
#
# Tutorial
# - https://tutorial.cytron.io/
#
# Raspberry Pi Pico
# - Maker Pi Pico https://my.cytron.io/p-maker-pi-pico?tracking=idris
# - LiPo 3.7V 1300mAH https://my.cytron.io/p-lipo-rechargeable-battery-3.7v-1300mah?tracking=idris
# - Maker Line https://my.cytron.io/p-maker-line-simplifying-line-sensor-for-beginner?tracking=idris
@brettohland
brettohland / 1.0 FormatStyle in Excruciating Detail.md
Last active April 20, 2024 10:41
FormatStyle in Excruciating Detail
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active April 20, 2024 10:39
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@okutbay
okutbay / free_email_provider_domains.txt
Last active April 20, 2024 10:39 — forked from tbrianjones/free_email_provider_domains.txt
Most complete list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created. I also use this list in my free link shortener service https://www.cut.lu and some day i want to release an API for rela…
This file has been truncated, but you can view the full file.
0-00.usa.cc
0-180.com
0-30-24.com
0-420.com
0-900.com
0-aa.com
0-mail.com
0-z.xyz
0.pl
#!/usr/bin/env python
# Boofuzz is a fork of and the successor to the venerable Sulley fuzzing framework.
# Besides numerous bug fixes, boofuzz aims for extensibility. The goal: fuzz everything.
# Github: https://github.com/jtpereyda/boofuzz
# Docs: http://boofuzz.readthedocs.io/en/latest/
# PDF: https://buildmedia.readthedocs.org/media/pdf/boofuzz/latest/boofuzz.pdf
#
# This project uses virtualenv to manage all dependencies. To properly install this project, run the following commands:
#
@SamsungGalaxyPlayer
SamsungGalaxyPlayer / protonvpn_exit_ips.py
Created July 25, 2023 19:45
Get all Proton VPN IP addresses and export them into a CSV file
import requests
import csv
response_data = requests.get('https://api.protonmail.ch/vpn/logicals')
response_json = response_data.json()
ip_list = []
for server in response_json['LogicalServers']:

Fuzzing CDT: Finding, reproducing, and reporting bugs

Introduction

This is a tutorial on how to write a fuzzer for a non-trivial real-world library, namely Artem Amirkhanov's CDT. It is a library for computing Constrained Delaunay Triangulations (CDTs, hence the name of the library). We will be working from the 9d99b32ae56b26cd2781678dc4405c98b8679a9f commit, since that is what I originally wrote the fuzzer for, and that way, we will be able to rediscover the same bugs I found back then.

If you want to follow along, clone the library using

$ git clone https://github.com/artem-ogre/CDT
$ cd CDT
@thomasnield
thomasnield / calling_kotlin_from_python.py
Created June 2, 2018 23:09
Calling Kotlin from Python
os.system("kotlinc src/main/kotlin/Launcher.kt -include-runtime -d launcher.jar")
process = Popen(['java', '-jar', 'launcher.jar', tmp_file_name], stdout=PIPE)
(stdout, stderr) = process.communicate()
@namhyun-gu
namhyun-gu / extract_font_url.js
Last active April 20, 2024 10:27
Extract font url from css (in javascript)
const regex = /url\((.*?)\) format\((\'|\")(.*?)(\'|\")\)/g;
const str = `CSS Input`;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
@AlexVipond
AlexVipond / README.md
Last active April 20, 2024 10:23
Updating arrays of elements with function refs in Vue 3

Updating arrays of elements with function refs in Vue 3

I did a screencast series recently talking about my favorite Vue 3 feature: function refs. Check out the screencast series for more context-in this gist, I'm going to answer a fantastic question I got in one of the videos' comment section.

This question was about how to properly update arrays of elements that are captured by function refs. Let's check out the basic principle first, before we look at the details of the question.

<script setup>
import { ref, onBeforeUpdate } from 'vue'