Skip to content

Instantly share code, notes, and snippets.

View nakasyou's full-sized avatar

Shotaro Nakamura nakasyou

View GitHub Profile
var last_id = "8999999999999999999";
init = () => {
let path = location.pathname.split("/"),
pathlist = ["home", "explore", "search", "notifications", "messages", "i"];
if (path.length != 2 || pathlist.includes(path[1])) {
alert("ユーザーのページを開いてください");
return;
}
screen_name = path[1];
https://nanoha.pages.dev/app/download?url=https://api.end2end.tech/download?id=f5d466698626
@nakasyou
nakasyou / miduhara_ippei.ts
Last active June 8, 2024 11:58
水原n平
/**
* Calc M(n)
* @param n number
*/
export const npei = (n: number) => n * 6200000000
@nakasyou
nakasyou / tailwind.css
Last active June 2, 2024 03:46
tailwind postcss
@tailwind base;
@tailwind components;
@tailwind utilities;
@nakasyou
nakasyou / eruda.ts
Created June 2, 2024 03:45
eruda vite
if (import.meta.env.DEV) {
const script = document.createElement('script')
script.src = 'https://cdn.jsdelivr.net/npm/eruda'
// @ts-ignore global eruda
script.onload = () => globalThis.eruda.init()
document.body.append(script)
}
@nakasyou
nakasyou / favorite-fonts.md
Created May 21, 2024 11:00
Google Fontsお気に入り
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nakasyou
nakasyou / marsddos.ts
Last active November 1, 2023 06:53
MarsDDoS CLI written with Deno
let targetUrl: string = ''
if (Deno.args[0]) {
try {
const urlObjectUrl = new URL(Deno.args[0])
urlObjectUrl.protocol = 'http:'
targetUrl = urlObjectUrl.href
alert(`${targetUrl} に指定しました!`)
break
} catch (_error) {
@nakasyou
nakasyou / getRandomColor.js
Created October 22, 2023 02:46
get random color
// @ts-check
/**
* Get random color code
* @return {string}
*/
export const getRandomColor = () => '#' + Math.random().toString(16).slice(2, 8)
@nakasyou
nakasyou / to_う.py
Last active October 10, 2023 12:00
LINE OC「小学生・中学生・高校生のプログラミングの質問に答えます」の「う」さんのために学校の課題をコーディングしました。
import pandas as pd
kokusei = pd.read_csv('data/c01.csv', encoding='shift-jis')
kokusei = kokusei.dropna(subset=['都道府県名'])
h27 = kokusei[kokusei['西暦(年)'] == 2015]
h27 = h27[~h27['都道府県コード'].isin(['00', '0A', '0B'])]