Skip to content

Instantly share code, notes, and snippets.

View etherealite's full-sized avatar

Etherealite etherealite

View GitHub Profile
"""
App configuration.
"""
import os
import yaml
from dataclasses import dataclass, field
from platformdirs import PlatformDirs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<style>
1
00:00:00,100 --> 00:00:01,550
はい皆さん、こんにちは。
2
00:00:01,550 --> 00:00:04,010
Bite size Japaneseのレイラです。
3
00:00:04,010 --> 00:00:10,890
@etherealite
etherealite / FSRS4Anki scheduler snippet
Last active January 13, 2024 07:36
FSRS4Anki scheduler snippet
// FSRS4Anki v4.11.1 Scheduler Qt6
set_version();
// The latest version will be released on https://github.com/open-spaced-repetition/fsrs4anki/releases/latest
// Configuration Start
const deckParams = [
{
// Default parameters of FSRS4Anki for global
"deckName": "global config for FSRS4Anki",
@etherealite
etherealite / WpCsp.php
Created September 12, 2022 01:16
Wordpress class to enable Content Security Policies
<?php
class WpCsp {
public function register(): void
{
add_filter('script_loader_tag', [$this, 'filter_script_loader_tag'], 3, 50);
add_filter('wp_inline_script_attributes', [$this, 'action_wp_inline_script_attributes']);
@etherealite
etherealite / vma-internal-plugin.php
Created September 2, 2022 06:12
Remove rewrite front from event post type archives
<?php
/**
* Plugin Name: VMA Internal Plugin
* Description: General purpose plugin for site specific integrations.
* Author: Evan Bangham
* Version: 0.0.1
* Author URI: https://github.com/etherealite
*
* Text Domain: VMA
**/
@etherealite
etherealite / inventoryadjustment.gql
Created August 7, 2022 19:59
Shopify Inventory Adjustment
query InventoryAdjustments($first: Int, $last: Int, $after: String, $before: String, $locationId: ID, $variantId: ID) {
location(id: $locationId) {
id
name
__typename
}
inventoryHistory(
first: $first
last: $last
after: $after
@etherealite
etherealite / product_properties.json
Created July 4, 2022 07:24
Sample of Shopify Cart Product Property key value pairs
[
[
"Customize the Message",
"asfdsf"
],
[
"Delivery Deadline",
"adfasdf"
],
[
@etherealite
etherealite / line-item.json
Created July 4, 2022 07:01
Shopify Notification email sample line-item
{
"id":866550311766439020,
"title":"Enlighten Tourmaline Stone Stretch Bracelet",
"price":"40.00",
"line_price":"40.00",
"quantity":1,
"sku":"BrSBMulStoStr",
"grams":26,
"properties":[
import random, inspect
def func_a():
if bool(random.getrandbits(1)):
func_b()
else:
func_c()
def func_b():