Skip to content

Instantly share code, notes, and snippets.

View aliceklipper's full-sized avatar

Alice Klipper aliceklipper

View GitHub Profile
@aliceklipper
aliceklipper / Booru.md
Last active March 13, 2016 13:29
Imageboard clients comparasion

TL;DR

Most advanced imageboard client at the moment — Sankaku Black, but it supports only chan.sankakucomplex.com board. Most advanced multi-imageboard client — Zenbooru, but it lacks some Sankaku's features. MoeGallery is most beautiful client, but completely useless for advanced searches.

Feature Web interface Zenbooru MoeGallery Sankaku Black
Supported boards
yande.re yes yes yes no
konachan.com yes yes yes no
chan.sankakucomplex.com yes no[1] no yes
@aliceklipper
aliceklipper / hello.kawaii
Last active February 25, 2017 14:29
Kawaii hello world
from console import print as p
async main () : I32
p('Hello from Kawaii!')
@aliceklipper
aliceklipper / io.kawaii
Last active February 25, 2017 14:52
Read text from file
from fs import readFile as read
from console import print
async main () : I32
let file = await read('hello.txt') # `file`'s type inferred as Buffer
print('File contents: `file`') # `file` converted to string using implicit `toString()` method invocation
@aliceklipper
aliceklipper / array-and-pure.kawaii
Last active February 25, 2017 15:22
Arrays and pure functions
from fs import readFile as read
from console import print
async main () : I32
let raw = (await read('array.txt')).toString()
let split = raw.split('\n')
let mapper = pure (line, number) # `line`'s type inferred as `String`
'Line #`number + 1`: `line`'
#
No `return` keyword
@aliceklipper
aliceklipper / Localizable.tsx
Created April 1, 2017 14:12
Abstract class for creating localizable React components (TS & MobX)
import * as React from 'react';
import { LocalizableStore } from './LocalizableStore';
export interface LocalizableProps {
l10n : LocalizableStore;
}
export abstract class Localizable<PropsType extends LocalizableProps, StateType> extends React.Component<PropsType, StateType> {
tl : (string : string) => string;
__ : (strings : TemplateStringsArray, ...props : any[]) => string;
@aliceklipper
aliceklipper / webpack.config.js
Last active November 30, 2019 16:16
Simplest config for just TS building
const { join } = require('path');
const webpack = require('webpack');
const DefinePlugin = webpack.DefinePlugin;
module.exports = {
target : 'web',
entry : './src/index.tsx',
output : {
chunkFilename : '[id].index.js',
filename : 'index.js',
./fuck.js:3:1,5:3: [type: {|ha: string|}]
./fuck.js:7:10-16: (base: This) => This
./fuck.js:7:19-22: This
./fuck.js:8:12,12:5: This
./fuck.js:8:26-29: This
./fuck.js:9:22-49: {|ha: string|}
./fuck.js:10:13-19: {+_exception: (...data: Array<any>) => void, +assert: (condition: mixed, ...data: Array<any>) => void, +clear: () => void, +count: (label: string) => void, +debug: (...data: Array<any>) => void, +dir: (...data: Array<any>) => void, +dirxml: (...data: Array<any>) => void, +error: (...data: Array<any>) => void, +group: (...data: Array<any>) => void, +groupCollapsed: (...data: Array<any>) => void, +groupEnd: () => void, +info: (...data: Array<any>) => void, +log: (...data: Array<any>) => void, +profile: (name: string) => void, +profileEnd: () => void, +table: (tabularData: {[key: string]: any,} | Array<{[key: string]: any,}> | Array<Array<any>>) => void, +time: (label: string) => void, +timeEnd: (label: string) => void, +timeStamp: (label?: string) => void, +trace: (...data: Array<any>) => void, +warn: (..
@aliceklipper
aliceklipper / sasai-kudasai.js
Created April 12, 2017 12:06
Here at lines 26 and 27 are type errors.
// @flow
function MSasaiable (constructor) {
return class extends constructor {
sasai (string : string) {
return `Sasai ${string}!`;
}
};
}
@aliceklipper
aliceklipper / README.md
Last active May 31, 2017 23:28
Оформление постов

Как постить

При постинге скринов постить подряд только один тайтл, перед первым скрином с каким-то тайтлом обязательно размещать пост по шаблону чуть ниже.

Чатик из канала лучше не устраивать, но если есть что сказать по делу (и хоть как-то полезное/интересное читателям) — всегда пожалуйста.

Главное, без фанатизма.

Шаблон

@aliceklipper
aliceklipper / xre-shashes.xml
Created June 11, 2017 12:33
xre regular expressions highlighting for IntelliJ IDEA
<LanguageInjectionConfiguration>
<injection language="RegExp" injector-id="js">
<display-name>xre-slashes</display-name>
<value-pattern>^/(.*)/.*$</value-pattern>
<place><![CDATA[jsLiteralExpression().withParent(psiElement().withText(string().startsWith("xre")))]]></place>
</injection>
</LanguageInjectionConfiguration>