Skip to content

Instantly share code, notes, and snippets.

View sarsamurmu's full-sized avatar

Sarsa Murmu sarsamurmu

View GitHub Profile
@sarsamurmu
sarsamurmu / card.html
Last active February 17, 2024 09:59
Highlight partly matched word
<script>
{
let s = `{{Reading_Sentence}}`
const targets = `{{Morph}}`
/** Mark part for highlighting later */
const hl = (s, partial = false) => partial ? `{#(${s})}` : `{(${s})}`
s = s.replace(/\s+/g, ' ')
let output = null
@sarsamurmu
sarsamurmu / 1by1.html
Last active December 31, 2023 16:32
Image Occlusion Enhanced One by One
<script>
var mask = document.querySelector('#io-overlay > img');
var svg = null
var nFill = '#FFF'
var qFill = '#FF7E7E'
var maskGroup = null
var occs = null
var currOccIdx = 0
async function swapToSvg() {
@sarsamurmu
sarsamurmu / README.md
Last active November 18, 2023 13:04
New Image Occlusion with Auto Occlude server

Setting up server

  • First install python in your system and make sure that these commands (run in terminal) give no error
python --version
pip --version
  • Then save the server.py file to a directory and run these commands in terminal to install dependencies
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
// For testing
@sarsamurmu
sarsamurmu / index.html
Created November 5, 2020 10:00
Lit CSS Plugin Snippet for Reboost JS
<html>
<head>
<script type="module" src="./build.js"></script>
</head>
<body>
<my-element></my-element>
</body>
</html>
[
{
"name": "City Sight",
"author": "Marvin Ronsdorf",
"collections": "Random",
"url": "https://raw.githubusercontent.com/sarsamurmu/minmax/Wallpapers/city-sight-marvin-ronsdorf.webp",
"thumb": "https://raw.githubusercontent.com/sarsamurmu/minmax/Wallpapers/t/city-sight-marvin-ronsdorf.png",
"downloadable": true
},
{
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Dynamic Clock -->
<dynamic-clock drawable="my_clock"
hourLayerIndex="0"
minuteLayerIndex="1"
secondLayerIndex="2"
defaultHour="10"
defaultMinute="10"
defaultSecond="30"/>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item drawable="sample"/>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item component="ComponentInfo{}" drawable="sample"/>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/my_icon_background"/>
<foreground android:drawable="@drawable/my_icon_foreground"/>
</adaptive-icon>