Skip to content

Instantly share code, notes, and snippets.

View nakasyou's full-sized avatar
📖
何やってるんですか 勉強してください

Shotaro Nakamura nakasyou

📖
何やってるんですか 勉強してください
View GitHub Profile
@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'])]
@nakasyou
nakasyou / matrix-js-sdk.min.js
Last active September 30, 2023 12:41
Matrix js sdk v28.2.0
This file has been truncated, but you can view the full file.
!function e(t,i,n){function r(s,a){if(!i[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var l=i[s]={exports:{}};t[s][0].call(l.exports,(function(e){return r(t[s][1][e]||e)}),l,l.exports,e,t,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(e,t,i){"use strict";for(var n=/[\\\"\x00-\x1F]/g,r={},o=0;o<32;++o)r[String.fromCharCode(o)]="\\U"+("0000"+o.toString(16)).slice(-4).toUpperCase();function s(e){return n.lastIndex=0,e.replace(n,(function(e){return r[e]}))}function a(e){switch(typeof e){case"string":return'"'+s(e)+'"';case"number":return isFinite(e)?e:"null";case"boolean":return e;case"object":return null===e?"null":Array.isArray(e)?function(e){for(var t="[",i="",n=0;n<e.length;++n)i+=t,t=",",i+=a(e[n]);return","!=t?"[]":i+"]"}(e):function(e){var t="{",i="",n=Object.keys(e);n.sort();for(var r=0;r<n.length;++
@nakasyou
nakasyou / fizzbuzz.go
Last active October 12, 2023 11:49
Goやってみた
package main
import "fmt"
func main () {
var index int = 1
for (index <= 100) {
if (index % 15 == 0) {
fmt.Println("FizzBuzz")
} else if (index % 5 == 0) {
fmt.Println("Buzz")