Skip to content

Instantly share code, notes, and snippets.

View zemlanin's full-sized avatar
💭
wandering aimlessly

Anton Verinov zemlanin

💭
wandering aimlessly
View GitHub Profile
@zemlanin
zemlanin / userstyle.css
Created September 13, 2022 14:36
The Urge
/* theverge.com */
.hidden:has(.m-ad),
.duet--content-cards--content-card:has([aria-label="Copy link"]) {
display: none !important;
}
.font-polysans {
font-family: Helvetica, Arial, sans-serif !important;
}
@zemlanin
zemlanin / libro-fm-concat.fish
Created July 31, 2022 09:18
Concatenate libro.fm files
# depends on eyeD3, ffmpeg, and jq (`brew install eye-d3 ffmpeg jq`)
# run when in the directory with unarchived tracks
ffmpeg \
-f concat \
-safe 0 \
-i (find (pwd) -name '*.mp3' | sed -e "s/\(.*\)/file '\1'/" | sort | psub) \
-c copy \
(basename -s " - Track 001.mp3" (find . -iname '* - Track 001.mp3'))".mp3"
@zemlanin
zemlanin / index.html
Created September 26, 2020 11:00
emoji touch icon
<!DOCTYPE html>
<meta charset="utf-8">
<title>test apple-touch-icon</title>
<canvas id=c width=180 height=180 style="border: 1px solid black"></canvas>
<div id=t></div>
<script>
const ctx = window.c.getContext('2d')
ctx.fillStyle = `rgb(${Math.floor(Math.random() * 256)}, ${Math.floor(Math.random() * 256)}, ${Math.floor(Math.random() * 256)})`;
ctx.fillRect(0, 0, 180, 180);
@zemlanin
zemlanin / thingist.js
Last active February 20, 2018 14:13
thingist.js
#!/usr/bin/env osascript -l JavaScript
const help = `
Export Things 3 area/project into Markdown format and upload it to GitHub Gist
./thingist.js --area <area-name>
./thingist.js --project <project-name>
./thingist.js --project <project-name> --token <github-token> --gist <gist-id>
Options:
@zemlanin
zemlanin / package.json
Created September 15, 2017 10:09
yarn flags order
{
"name": "yarn-flags-order",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"echo": "echo $NODE_ENV"
}
}
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var A = (function () {
function A(cb) {
this.cb = cb;
}
return A;
@zemlanin
zemlanin / .babelrc
Created September 2, 2016 11:04
wallaby transform
{
"presets": ["es2015", "react"]
}
@zemlanin
zemlanin / castcl.js
Created February 5, 2016 14:29
castcl.js
var Client = require('castv2-client').Client;
var Application = require('castv2-client').Application;
var util = require('util');
var MyApp = function() {
Application.apply(this, arguments);
};
MyApp.APP_ID = 'D60F290C';
util.inherits(MyApp, Application);
@zemlanin
zemlanin / diff.js
Last active December 25, 2015 13:16
// https://babeljs.io/repl/#?evaluate=true
function getDiff(that, other) {
if (that == other) { return {} }
if (_.isEmpty(other)) {
return {all: true}
}
if (_.isObject(that)) {
@zemlanin
zemlanin / echo.coffee
Created July 20, 2015 15:12
react/rxjs wrapper
_ = require 'lodash'
{addons: {cloneWithProps}} = require 'react'
echoEvent = (rxId, eventStream, eventName, ev) ->
eventStream.onNext {
ev
rxId
type: eventName
}