Skip to content

Instantly share code, notes, and snippets.

View Lycolia's full-sized avatar
🍥

Lycolia Rizzim Lycolia

🍥
View GitHub Profile
@Lycolia
Lycolia / index.js
Last active February 22, 2024 16:00
Error handling benchmark at JavaScript
const errorObject = (param) => {
if (param === true) {
return {
isError: false,
payload: 'TRUE',
};
} else {
return {
isError: true,
payload: 'ERR',
@Lycolia
Lycolia / notes-remover.php
Last active June 6, 2023 02:56
Misskey notes remover
<?php
# =====================================================
# Confirmed work with Misskey 13.12.2
# Requires openssl extension and PHP 7.4.0 or later
# Edit php.ini
# ;extension=openssl -> extension=openssl
# =====================================================
set_time_limit(0);
# ==================== Config Start ===================
@Lycolia
Lycolia / index.html
Last active May 22, 2023 18:53
Create Slack reminder command utillity
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Slack Reminder Creator</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<script>
const inputState = {
chName: '',
@Lycolia
Lycolia / stable-diffusion-webui-preset.ipynb
Last active May 3, 2023 19:15
Stable Diffusion web UI(AUTOMATIC1111) setup preset
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Lycolia
Lycolia / yarpp-template-thumbnail.php
Last active March 30, 2023 11:48
YARPP thumbnail template for SANGO theme
<?php
function get_post_data($post_id) {
$url = esc_url(get_permalink($post_id));
$title = esc_attr(get_the_title($post_id));
$img = '';
if (has_post_thumbnail($post_id)) {
$img = get_the_post_thumbnail_url($post_id, 'thumb-520');
} else {
@Lycolia
Lycolia / get-progress-func.sh
Last active January 17, 2022 00:50
Get progress of specified in GitHub Issues
#!/bin/bash
getProgress() {
local issueNo=$1
local issue=$(curl -sS \
-H "Authorization: token $GH_TOKEN" \
-H "Accept: 'application/vnd.github.v3+json'" \
https://api.github.com/repos/$TARGET_REPO/issues/$issueNo \
| perl -lpe 's/\n//')
@Lycolia
Lycolia / get-tsv-weight-and-body_fat-from-asken_web.js
Last active December 10, 2021 00:48 — forked from yosiopp/get_weights_from_asken.js
asken.jpのPC画面で日付、体重、体脂肪率をTSV形式で取得
/**
* ## 使い方
*
* 1. あすけん PC サイトにログイン
* 2. データを取得したい範囲で beginYear, endYear を設定
* 3. ブラウザのコンソールにこのスクリプトを流す
* 4. TSV がコンソールに出力される
*/
/** データ取得開始年 */
@Lycolia
Lycolia / user.js
Last active April 3, 2021 09:18
Disable Google analytics by owner access
// ==UserScript==
// @name Disable Google analytics
// @description Disable Google analytics by owner access
// @author Lycolia Rizzim
// @namespace https://lycolia.info/
// @version 0.1
// @match pattern here
// @run-at document-start
// @grant none
// ==/UserScript==
@Lycolia
Lycolia / remove-git-shellex.reg
Created March 15, 2021 01:04
Remove git shell extention
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\shell\git_gui]
[-HKEY_CLASSES_ROOT\Directory\shell\git_shell]
[-HKEY_CLASSES_ROOT\LibraryFolder\background\shell\git_gui]
[-HKEY_CLASSES_ROOT\LibraryFolder\background\shell\git_shell]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell]
@Lycolia
Lycolia / switch-pull-back-branch.py
Created February 21, 2021 23:32
git switch pull back branch with auto --skip-work-tree
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#region 環境
import sys
import subprocess
# トレースバック非表示
sys.tracebacklimit = 0