Skip to content

Instantly share code, notes, and snippets.

@DaveMDS
DaveMDS / get-docker.sh
Last active May 6, 2024 04:49 — forked from ta264/get-docker.sh
Install docker on arm64 synology
#!/bin/bash
set -e
ARCH=aarch64
DOCKER_VERSION=20.10.9
COMPOSE_VERSION=2.5.1
DOCKER_DIR=/volume1/@docker
echo "Downloading docker $DOCKER_VERSION-$ARCH"
curl "https://download.docker.com/linux/static/stable/$ARCH/docker-$DOCKER_VERSION.tgz" | tar -xz -C /usr/local/bin --strip-components=1
@vitorgalvao
vitorgalvao / Get Title and URL.applescript
Last active May 6, 2024 04:49
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers.
-- AppleScript --
-- This example is meant as a simple starting point to show how to get the information in the simplest available way.
-- Keep in mind that when asking for a `return` after another, only the first one will be output.
-- This method is as good as its JXA counterpart.
-- Webkit variants include "Safari", "Webkit", "Orion".
-- Specific editions are valid, including "Safari Technology Preview".
-- "Safari" Example:
tell application "Safari" to return name of front document
@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")