Skip to content

Instantly share code, notes, and snippets.

View abiriadev's full-sized avatar
|| -> Result<_, !> { Abiria()? }

Abiria abiriadev

|| -> Result<_, !> { Abiria()? }
View GitHub Profile

With You

(Hoaprox & Nick Strand & Mio)

Verse 1

When the days and nights getting colder
낮과 밤이 점점 추워져 가고

And the end is a heartbeat away \

opcua-mock-server-server-1 | 07:13:54.059Z :opcua_server :1314 Session OPCLib is being transferred from channel 484 to channel 485
opcua-mock-server-server-1 | /opc/node_modules/.pnpm/[email protected]/node_modules/node-opcua-address-space/dist/src/base_node_impl.js:236
opcua-mock-server-server-1 | return this.addressSpacePrivate.getNamespace(this.nodeId.namespace);
opcua-mock-server-server-1 | ^
opcua-mock-server-server-1 |
opcua-mock-server-server-1 | TypeError: Cannot read properties of null (reading 'getNamespace')
opcua-mock-server-server-1 | at get namespace [as namespace] (/opc/node_modules/.pnpm/[email protected]/node_modules/node-opcua-address-space/dist/src/base_node_impl.js:236:41)
opcua-mock-server-server-1 | at SessionContext.getApplicableRolePermissions (/opc/node_modules/.pnpm/[email protected]/node_modules/node-opcua-address-space/dist/source/session_context.js:181:3

How to Dump & Restore MySQL Databases Using Docker

Disclaimer

This guide assumes specific scenarios, such as when you need to dump an existing production environment database and run it locally for inspection or testing.

So we don't make any changes to the official MySQL image, build our own image, or publish a hefty image to our own private production-ready Docker registry running on EC2 instance, etc.

In this way, you can easily switch between multiple dump files with minimal effort; just copy the SQL files, and restart the container.

@abiriadev
abiriadev / main.c
Created July 15, 2023 14:52
boj 11729 solution
#include <math.h>
#include <stdio.h>
int rst(int a, int b) {
return a == 1 ? b == 2 ? 3 : 2 : a == 2 ? b == 1 ? 3 : 1 : b == 1 ? 2 : 1;
}
void hanoi(int depth, int src, int dest) {
if (depth == 1)
printf("%d %d\n", src, dest);
@abiriadev
abiriadev / rev.c
Created July 11, 2023 04:34
C integer array reversing function
void reverse_array(int *arr, size_t n) {
for (int i = 0, j = n - 1; i < n / 2; ++i && --j)
arr[i] ^= arr[j] ^= arr[i] ^= arr[j];
}
Language: Cpp
BasedOnStyle: LLVM
AlignAfterOpenBracket: BlockIndent
AlignOperands: DontAlign
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
BinPackArguments: false
BinPackParameters: false
int cmp(const void *a, const void *b) { return (*(int *)a > *(int *)b) - (*(int *)a < *(int *)b); }
@abiriadev
abiriadev / sol.c
Created June 19, 2023 06:07
sieve of Eratosthenes
#include <stdbool.h>
#include <stdio.h>
#define N 1000
int main() {
bool s[N];
int n, k;
// scanf("%d %d", &n, &k);
n = 12;
#include <stdint.h>
uint64_t cnr(uint64_t n, uint64_t r) {
uint64_t c = 1;
for (uint64_t rr = 1; rr <= r; rr++) {
c *= n--;
c /= rr;
}
return c;
}
@abiriadev
abiriadev / main.c
Created June 7, 2023 22:16
설명을 적어주세요
#include <stdio.h>
#define N 1000
void swap(int *a, int *b) {
int tmp = *a;
*a = *b;
*b = tmp;
}