Skip to content

Instantly share code, notes, and snippets.

@yunazuno
yunazuno / dns64.py
Created September 2, 2015 05:29
A DNS64 resolver with AAAA filter-like behavior (similar to the Internet Shareing on OSX El Capitan)
#!/usr/bin/env python2
from twisted.internet import reactor
from twisted.names import client, dns, server
import ipaddr
import socket
class SixFourResolver(client.Resolver):
def __init__(
self,
@diamondo25
diamondo25 / script.idc
Created July 30, 2015 12:02
MapleStory IDC script
// IDC script for identifying functions and such
#include <idc.idc>
#define RenameFunction(a, b) Message("Found %s at %a\r\n", b, a); MakeName(a, b)
#define START_ADDR 0x00400000
static main() {
auto addr = BADADDR;
auto onMovePacket = FindAoBAndRename("25 0C FE FF FF 05 E8 03", "?OnMovePacket@CMovePath@@QAEXAAVCInPacket@@H@Z");
@lgnrvz
lgnrvz / AppModule.kt
Created September 2, 2023 06:52
A ViewModel for getting the realtime location and last time collection of the user with Dagger-Hilt implementation
import android.content.Context
import com.google.android.gms.location.FusedLocationProviderClient
import com.google.android.gms.location.LocationServices
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
@InstallIn(SingletonComponent::class)
@developer-guy
developer-guy / KIND_Networking.md
Created October 21, 2020 10:00 — forked from aojea/KIND_Networking.md
Use KIND to emulate complex network scenarios

Networking scenarios [Linux Only]

KIND runs Kubernetes cluster in Docker, and leverages Docker networking for all the network features: port mapping, IPv6, containers connectivity, etc.

Docker Networking

KIND uses a docker user defined network.

It creates a bridge named kind

@theRemix
theRemix / exercise.md
Created July 26, 2015 02:25
MongoDB Practice

MongoDB Practice

MongoDB Exercise in mongo shell

Connect to a running mongo instance, use a database named mongo_practice.

Document all your queries in a javascript file to use as a reference.

Insert Documents

@aradalvand
aradalvand / DockerfileForSvelteKit.md
Last active May 6, 2024 04:15
Dockerfile and .dockerignore for SvelteKit:

*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.

Dockerfile:

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
@ih2502mk
ih2502mk / list.md
Last active May 6, 2024 04:10
Quantopian Lectures Saved
@AndrewMast
AndrewMast / disable_vanguard.vbs
Last active May 6, 2024 04:07
Commands to disable Riot Vanguard when you aren't playing Valorant
' Disables Vanguard from starting when you boot your computer
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas")
@sweetcard
sweetcard / InstanceRegistrationResource.java
Created May 6, 2024 04:07 — forked from PierreBesson/InstanceRegistrationResource.java
Eureka microservice manual registration
@RestController
@RequestMapping("registration")
public class InstanceRegistrationResource {
private final InstanceRegistrationService instanceRegistrationService;
public InstanceRegistrationResource(InstanceRegistrationService instanceRegistrationService) {
this.instanceRegistrationService = instanceRegistrationService;
}
@PostMapping("register")
@PierreBesson
PierreBesson / InstanceRegistrationResource.java
Created September 25, 2017 12:53
Eureka microservice manual registration
@RestController
@RequestMapping("registration")
public class InstanceRegistrationResource {
private final InstanceRegistrationService instanceRegistrationService;
public InstanceRegistrationResource(InstanceRegistrationService instanceRegistrationService) {
this.instanceRegistrationService = instanceRegistrationService;
}
@PostMapping("register")