Skip to content

Instantly share code, notes, and snippets.

View pelly-ryu's full-sized avatar

pelly ryu pelly-ryu

View GitHub Profile
@pelly-ryu
pelly-ryu / visitLocation.ts
Created October 27, 2023 01:02
adapters/indexedDB/visitLocation.ts
import { type StoreKey } from "idb";
import {
type DefaultDB,
type LocationWithTimestamp,
StoreName,
getDb,
} from "@/adapters/indexedDB/core";
type Store = {
@pelly-ryu
pelly-ryu / core.ts
Created October 27, 2023 01:01
/adapters/indexedDB/core.ts
import { captureException } from "@sentry/vue";
import { type DBSchema, openDB } from "idb";
import { IDBPDatabase } from "idb/build/entry";
export enum StoreName {
VisitLocation = "visitLocation",
ActionLog = "actionLog",
}
export interface LocationWithTimestamp {
@pelly-ryu
pelly-ryu / graphql-directives.js
Last active June 17, 2023 21:17 — forked from pikanji/graphql-directives.js
Amplify GraphQL Directive Definitions
import gql from "graphql-tag";
// https://docs.amplify.aws/cli-legacy/graphql-transformer/directives/
const clientSchemaExtensions = gql`
# https://docs.amplify.aws/cli/graphql/data-modeling/#how-it-works
directive @model(
queries: ModelQueryMap
mutations: ModelMutationMap
subscriptions: ModelSubscriptionMap
timestamps: TimestampConfiguration
/* @jsx h */
import { Fragment, h } from "preact";
import { useEffect, useState } from "preact/compat";
interface PluginInfo {
id: string;
name: string;
author: string;
description: string;
repo: string;
import * as THREE from "three";
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
import { Renderer } from "three";
import { PerspectiveCamera } from "three/src/cameras/PerspectiveCamera";
function resetCanvas(renderer: Renderer, camera: PerspectiveCamera) {
const size = document.body.clientWidth;
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(size, size);
SELECT
merchants.vendor_id,
merchants.is_disconnected,
merchants.gmc_account_id,
merchants.created_at,
ads.google_ads_account_id,
account_issues.issue_id,
account_issues.severity,
account_issues.title,
account_issues.updated_at AS IssueUpdatedAt
function a() {
return true
}
function b() {
return 0
}
export default {
a,
-------------------------------------
/var/log/nginx/access.log
-------------------------------------
178.128.234.200 - - [18/Dec/2019:02:26:01 +0000] "GET / HTTP/1.0" 502 157 "-" "masscan/1.0 (https://github.com/robertdavidgraham/masscan)" "-"
188.166.45.128 - - [18/Dec/2019:04:34:15 +0000] "GET / HTTP/1.0" 502 157 "-" "masscan/1.0 (https://github.com/robertdavidgraham/masscan)" "-"
142.93.187.70 - - [18/Dec/2019:04:52:00 +0000] "GET / HTTP/1.0" 502 157 "-" "masscan/1.0 (https://github.com/robertdavidgraham/masscan)" "-"
41.216.186.89 - - [18/Dec/2019:04:54:30 +0000] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 157 "-" "-" "-"
59.127.175.130 - admin [18/Dec/2019:05:03:45 +0000] "POST /editBlackAndWhiteList HTTP/1.1" 502 157 "-" "ApiTool" "-"
111.20.101.110 - - [18/Dec/2019:09:11:18 +0000] "GET / HTTP/1.1" 400 157 "-" "-" "-"
@pelly-ryu
pelly-ryu / for_range.go
Created October 21, 2019 08:26
test for range with goroutine
func TestForRange(t *testing.T) {
m := map[string]string{
"a": "1",
"b": "2",
}
go func() {
time.Sleep(1*time.Second)
m["b"] = "3"
fmt.Println("!")
@pelly-ryu
pelly-ryu / kyu-9012.go
Last active September 9, 2019 17:25 — forked from fukkong/kyu-9012.go
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
var n int