Skip to content

Instantly share code, notes, and snippets.

@slnq
slnq / hiteigaki.c
Last active February 5, 2024 07:17
否定書きに関するプログラム
#define N 1260L
#include <stdio.h>
#include <math.h>
#include <stdbool.h>
double yokogaki(double y, double x) {
return (x-1)*y + sqrt(pow(x-1, 2)+1.0)*(y-1);
}
@slnq
slnq / easing.html
Last active October 30, 2023 15:22
手描きでイージングを描き動かす: https://gist-4d0c6.web.app/draw.html
<html>
<body>
<canvas id='canvas'></canvas>
<div id="square"></div>
<style>
html,body {
overflow: hidden;
@slnq
slnq / se
Last active February 7, 2024 08:52
set terminal pdfcairo color enhanced font "Arial,12"
set samples 1000
set ylabel 'Intensity'
set xlabel 'energy transfer / meV'
#set style fill transparent solid 0.50 noborder
set style fill solid 0.50 noborder
set key vertical maxrows 2 right top
set noautoscale xy
set noytics
@slnq
slnq / userChrome.css
Last active August 11, 2023 13:57
setting for Firefox and Vivaldi
#forward-button, #back-button, #context-sendpagetodevice, #context-inspect-a11y, #context-savepage, #context-selectall, #context-viewsource, #context-inspect, #context-screenshot, #context-openlinkintab, #context-openlink, #context-openlinkprivate, #context-bookmarklink, #context-sendlinktodevice, #context-viewpartialsource-selection, #context-sendimage, #context-setDesktopBackground, #unified-extensions-button, #star-button, #PanelUI-menu-button, menuseparator { display: none !important; }
:root {
--tab-min-height: 25px !important;
--urlbar-min-height: 20px !important;
}
.browserContainer > findbar {
position: fixed;
top: 1;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<form>
<table>
<tr>
<td align="right"><label for="input_targets">targets :</label></td>
<html>
<body>
<table>
<tbody id="test">
</tbody>
</table>
</body>
<script>
const year = 2020;
const data = [[20201124, 6], [20200905, 10], [20200918, 20], [20200705, 11], [20200424, 1], [20200327, 16], [20200808, 11], [20200616, 10], [20200112, 4], [20201018, 17], [20200527, 11], [20201228, 12], [20200804, 19], [20200815, 13], [20200501, 13], [20200427, 20], [20200327, 4], [20201119, 3], [20200221, 10], [20200922, 8], [20200912, 7], [20200512, 1], [20200424, 12], [20200615, 18], [20200812, 14], [20200405, 20], [20200419, 6], [20200519, 10], [20201015, 13], [20201027, 9], [20200311, 7], [20201216, 15], [20200827, 9], [20200525, 13], [20201217, 16], [20201216, 14], [20200506, 14], [20201206, 18], [20200724, 19], [20200812, 9], [20200726, 2], [20201102, 12], [20200604, 4], [20200508, 9], [20200823, 17], [20200625, 17], [20200427, 13], [20200413, 16], [20200704, 20], [20200928, 20], [20200513, 2], [20200728, 8], [20200224, 7], [20201026, 4], [20200507, 11], [20200227, 12], [20201012, 12], [20201202, 1], [20
@slnq
slnq / get_favorite_spotify.gs
Last active August 11, 2023 12:54
get favorite song from spotify and playlist from youtube
const sheet = SpreadsheetApp.getActive().getActiveSheet();
// アクセストークンの発行
function getToken() {
const client_id = sheet.getRange("B1").getValue();
const client_secret = sheet.getRange("E1").getValue();
const refresh_token = sheet.getRange("H1").getValue();
const endpoint = 'https://accounts.spotify.com/api/token'
const encode = Utilities.base64Encode(client_id + ":" + client_secret, Utilities.Charset.UTF_8)
const options = {
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>画像を丸いドットで表示する</title>
</head>
<body>
<footer>
<div class="input-container">
@slnq
slnq / marindeck.css
Last active March 25, 2023 05:28
custom css for marindeck
.tweet > .tweet-footer {
display: none !important;
}
.js-stream-item-content.item-box.js-show-detail {
padding-top: 1px !important;
padding-bottom: 0px !important;
}
.avatar,