Skip to content

Instantly share code, notes, and snippets.

View AndreyZarembo's full-sized avatar

Andrey Zarembo AndreyZarembo

View GitHub Profile
@AndreyZarembo
AndreyZarembo / Example.swift
Created February 12, 2024 11:27
SwiftUI with UIKit Property value sync
enum VProps: ViewCoordinatorProperty {
case zoom
}
struct V: View {
@Binding var zoom: CGFloat
var body: some View {
return VC(zoom: $zoom)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AndreyZarembo
AndreyZarembo / video2gif.sh
Created November 19, 2022 11:21
Video To Gif on OSX [ffmpeg required]
#!/bin/bash
# rev4 - changes suggested by KownBash https://www.reddit.com/r/bash/comments/5cxfqw/i_wrote_a_simple_video_to_gif_bash_script_thought/da19gjz/
# Usage function, displays valid arguments
usage() { echo "Usage: $0 [-f <fps, defaults to 15>] [-w <width, defaults to 480] inputfile" 1>&2; exit 1; }
# Default variables
fps=15
width=480
@AndreyZarembo
AndreyZarembo / crete_child_page_button.html
Created November 16, 2022 14:44
Tiddly wiki tweak to create button or link to child page via template
\define child_page_link() $(parent_tiddler)$/$(child_title)$
\define if(filter,ifyes,ifno)
<$list filter="""$filter$ +[limit[1]]""" name=act emptyMessage=<<$ifno$>> variable="temp_var">
<<$ifyes$>>
</$list>
\end
\define ifyes()
@AndreyZarembo
AndreyZarembo / image_checkbox.html
Created November 16, 2022 09:11
Tiddly Wiki Image Checkbox
<style>
.mushtra_checkbox {
display: inline-block;
overflow: hidden;
width: 64px;
height: 64px;
margin: 2px;
}
.mushtra_checkbox > input[type=checkbox] + span {
display: inline-block;
@AndreyZarembo
AndreyZarembo / lean_canvas_template.html
Created November 11, 2022 16:51
Tiddly Wiki Add Templated Child Page Creation
<!-- Create Tiddler and call it like $:/tweaks/projects/lean_project -->
<!-- Add tags $:/tweak/auto_template and Lean to apply as Autotemplate(see another gist) -->
\define current_tiddle_tags() [[$(currentTiddler)$]]
\define lean_canvas_title() $(currentTiddler)$/LeanCanvas
\define lean_canvas_link() [[Open LeanCanvas|$(currentTiddler)$/LeanCanvas]]
\define if(filter,ifyes,ifno)
<$list filter="""$filter$ +[limit[1]]""" name=act emptyMessage=<<$ifno$>> variable="target_tiddle">
@AndreyZarembo
AndreyZarembo / auto_templates.html
Created November 11, 2022 15:20
Tiddly Wiki Apply Templates By Tag
<!-- Create Tiddler with name like $:/tweak/auto_templates -->
<!-- Add $:/tags/ViewTemplate tag to it -->
<!-- Uncomment 'This tiddler Matches <$text text=<<auto_template>>' string to see which tiddler get which template -->
<$list filter="[tag[$:/tweak/auto_template]]" variable="auto_template">
<$list filter="[<auto_template>get[tags]enlist-input[]] +[remove[$:/tweak/auto_template]]" variable="template_tags">
<$reveal type="gt" default={{{ [<currentTiddler>tag<template_tags>count[]] }}} text=0>
<!-- This tiddler Matches <$text text=<<auto_template>> /> -->
@AndreyZarembo
AndreyZarembo / active_projects.html
Created November 10, 2022 12:28
Tiddly Wiki Project Cards
<!-- Create Tiddler with name Active projects. Replace __project_tag__ with your tag -->
<style>
.card {
/* Add shadows to create the "card" effect */
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
width:256px;
border-radius: 5px;
padding-top: 2px;
padding-bottom: 8px;
@AndreyZarembo
AndreyZarembo / rounder_corners.html
Created November 9, 2022 14:59
Tiddly Wiki Ronder Corrers
<!-- Create new Tiddler say $:/tweaks/more_round_corners -->
<!-- Add $:/tags/Stylesheet to it -->
<style>
.tc-tiddler-frame {
border-radius: 14px;
}
</style>
@AndreyZarembo
AndreyZarembo / style_sheet.html
Created November 9, 2022 14:56
Tiddly Wiki Change Missing Pages Style
<!-- Create new Tiddler say $:/tweaks/missing_links_color -->
<!-- Add $:/tags/Stylesheet to it -->
<style>
a.tc-tiddlylink-missing {
color: #d87857;
text-decoration: none;
}
a.tc-tiddlylink-missing:hover {