Skip to content

Instantly share code, notes, and snippets.

View Stvad's full-sized avatar

Vlad Sitalo Stvad

View GitHub Profile
@Stvad
Stvad / Back Template
Created October 28, 2016 19:25 — forked from pneff/Back Template
Anki Card Type for multiple-choice
<div class="check-container"><span id="check"></span></div>
{{#Question}}
<p>{{Question}}</p>
{{/Question}}
{{#Image}}
<p class="image">{{Image}}</p>
{{/Image}}
@Stvad
Stvad / asana-time-calculator-greasemonkey
Created June 9, 2017 23:28 — forked from AlexJoom/asana-time-calculator-greasemonkey
A greasemonkey script for asana tasks. 1. Download greasemonkey 2. Name your tasks like "5h | Create birthday cake" "2h | Buy the present" and the total hours per person will be calculated and presented in the top of the page, under the project's description
// ==UserScript==
// @name Asana tasks helper
// @namespace test
// @description test
// @include https://app.asana.com/*
// @version 1
// @grand none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==

Keybase proof

I hereby claim:

  • I am stvad on github.
  • I am stvad (https://keybase.io/stvad) on keybase.
  • I have a public key ASBSlrVrxW4570R_8hGRoCrxIZ60JjpUhx_y7k118BWQUwo

To claim this, I am signing this object:

@Stvad
Stvad / Digital_conscience.js
Last active October 2, 2017 18:05
Greasmonkey script to ask you if you really want to access some distracting web resource
// ==UserScript==
// @name Timeout blocker v2
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @grant GM_addStyle
// @grant GM_setValue
// @grant GM_getValue
// @match https://www.facebook.com/*
// ==/UserScript==
//--- The @grant directive is used to restore the proper sandbox.
@Stvad
Stvad / lesson6-cat-problem.ipynb
Last active May 7, 2018 19:59
Fast.ai Lesson6 problem with cat model
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Stvad
Stvad / functiona_cubs.kt
Created August 16, 2018 21:31
Functional cubs Kotlin
object Part1 {
fun captcha(input: String): Int =
input.zipWithNext()
.let { it + (input.first() to input.last()) }
.filter { (first, second) -> first == second}
.map { it.first }
.map(Character::getNumericValue)
.sum()
}
@Stvad
Stvad / surfingkeys_config.js
Last active April 20, 2022 04:34
Surfingkeys config
// https://github.com/brookhong/Surfingkeys/wiki/Migrate-your-settings-from-0.9.74-to-1.0
const {
aceVimMap,
mapkey,
imap,
imapkey,
vmap,
getClickableElements,
vmapkey,
map,
@Stvad
Stvad / example_breaking1.mdx
Created January 15, 2021 05:39
gatsby 28815

```

import static

@Stvad
Stvad / finance tracking notebook.json
Created August 8, 2021 20:33
Net worth reactive notebook with iRoam
[{"create-time":1628452793788,"title":"finance tracking notebook",":create/user":{":user/uid":"6bJAKBYrpIcPZBpFEpexUwW3x5r1"},"children":[{"edit-time":1628452795552,"children":[{"string":"```javascript\n_ = require('lodash')```","create-time":1628434574298,"uid":"KFNPf1QWU","edit-time":1628452795552,":create/user":{":user/uid":"6bJAKBYrpIcPZBpFEpexUwW3x5r1"},":edit/user":{":user/uid":"6bJAKBYrpIcPZBpFEpexUwW3x5r1"}},{"string":"```javascript\nstate = observe(\"lAzI6D32V\")\n\nfunction deserializeAsset(node) {\n return {\n name: node.text,\n price: parseFloat(node[\"last price\"].attributeValue),\n position: parseFloat(node[\"position\"].attributeValue),\n type: node[\"type\"].attributeValue,\n accessRestricted: node[\"access restricted\"].attributeValue === \"True\",\n value() {\n return this.price*this.position\n }\n }\n}\n\nfunction assetsValue(assets) {\n return assets.map(it=>it.value()).reduce((a,b)=>a+b)\n}\n\nassets = state.children.map(deserializeAsset)```","create-time":16
@Stvad
Stvad / d.js
Last active August 17, 2021 21:01
delete empty Roam blocks
empty = roamAlphaAPI.q(
'[:find ?uid :where [?x :block/string ?content] [?x :block/uid ?uid] [(clojure.string/blank? ?content)]]')
empty.map(it=>block(it[0])).filter(it=>it.children.length === 0 ).forEach(it=>{
roamAlphaAPI.deleteBlock({block: {uid: it.uid}})
})