Skip to content

Instantly share code, notes, and snippets.

@S-YOU
S-YOU / aes.go
Created November 2, 2022 19:11 — forked from enyachoke/aes.go
simple AES encryption/decryption example with PBKDF2 key derivation in Go, Javascript, and Python
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"fmt"
"strings"
1) Make a download dir to store the node source and download it.
mkdir downloads
cd downloads
git clone https://github.com/joyent/node.git
Find the latest version
2) List all of the tags in the repository, and check out the most recent.
git tag
git checkout v0.9.9
@S-YOU
S-YOU / Download-Shopify-CDN-Assets.md
Created November 10, 2021 02:33 — forked from ridem/Download-Shopify-CDN-Assets.md
Download all Shopify CDN assets from a store

Instructions

  1. Go to your Shopify admin/settings/files page
  2. Open your browser Dev tools, go to the console

Then, depending on the option you choose:

Option 1 - Download all the files directly (might crash you browser)

  1. Make sure your browser is set to download files automatically and doesn't ask for the download location every time
@S-YOU
S-YOU / aini_graphql_vuln.md
Created September 30, 2021 14:20 — forked from mala/aini_graphql_vuln.md
GraphQL採用サービスに追加で脆弱性を報告した話

GraphQL採用サービスに追加で脆弱性を報告した話

前置き

  • 個人の活動であり文責は全てmalaにあります。
  • 網羅的に調べているわけではないので、自分が利用していたり、調査したサービスに他の脆弱性が無いことを保証するものではないです。

概要

  • ainiというサービス https://helloaini.com/ のGraphQLでの情報露出の脆弱性に関する記事を見て、追加で調べたところ、Webサイトやアプリ上から参照できない他のユーザーのフォロー/フォロワー関係をGraphQL経由で取得することが出来ることを発見した。
@S-YOU
S-YOU / Audio.WebAudio.Browser.Compat.md
Created July 5, 2021 15:17 — forked from uupaa/Audio.WebAudio.Browser.Compat.md
Audio, WebAudio, Blob, ArrayBuffer
  1. Audio(url)
  2. Audio(arraybuffer)
  3. Audio(blob)
  4. WebAudio(arraybuffer)
  5. WebAudio(blob)

Audio file access with streaming

http://uupaa.net/issues/3/ の結果

@S-YOU
S-YOU / nginx-tuning.md
Created October 20, 2020 02:43 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@S-YOU
S-YOU / nginx-tuning.md
Created October 20, 2020 02:43 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@S-YOU
S-YOU / timerfdtest.c
Created September 22, 2020 16:03 — forked from ianpartridge/timerfdtest.c
epoll timerfd example
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/epoll.h>
#include <sys/timerfd.h>
static char *itimerspec_dump(struct itimerspec *ts);