Skip to content

Instantly share code, notes, and snippets.

View piscis's full-sized avatar
🧱
¯\_(ツ)_/¯

Alex piscis

🧱
¯\_(ツ)_/¯
View GitHub Profile
🎉 Merged PR #57 in piscis/fritzbox-cloudflare-dyndns-vercel
🎉 Merged PR #47 in piscis/fritzbox-cloudflare-dyndns-vercel
🎉 Merged PR #56 in piscis/fritzbox-cloudflare-dyndns-vercel
🎉 Merged PR #81 in piscis/fritzbox-cloudflare-dyndns-vercel
🎉 Merged PR #65 in piscis/fritzbox-cloudflare-dyndns-vercel
@piscis
piscis / I'm an early 🐤
Last active December 1, 2023 04:03
productive-box
🌞 Morning 412 commits ███▍░░░░░░░░░░░░░░░░░ 16.1%
🌆 Daytime 1188 commits █████████▊░░░░░░░░░░░ 46.5%
🌃 Evening 893 commits ███████▎░░░░░░░░░░░░░ 35.0%
🌙 Night 61 commits ▌░░░░░░░░░░░░░░░░░░░░ 2.4%
import 'dart:async';
// This is a workaround because sleep from dart:io breaks DartPad instead we're using a Future
Future sleep1() {
return new Future.delayed(const Duration(seconds: 1), () => "1");
}
void main() {
do_long_running_fancy_stuff() {
@piscis
piscis / 01-salutations.md
Last active March 5, 2018 12:25
List of English salutations by % of usage

Mr.
Mrs.
Miss
Dr.
Ms.
Prof.
Rev.
Lady
Sir
Capt.

@piscis
piscis / batchload.js
Created June 21, 2017 21:27
Batch loading font files react native
import async from 'async';
import { loadFont } from 'react-native-dynamic-fonts';
const fonts = [];
// Roboto-Regular
fonts.push({
type: 'ttf',
name: 'Roboto-Regular',
content: 'data:application/x-font-ttf;charset=utf-8;base64,AAEAAAASAQAABAAgR0RFRrRCsIIAAijcAAACYkdQT1P/GhLXAAIrQAAAXcxHU1VC64LkWQACiQwAABWQT1MvMpeCsagAAAGoAAAAYGNtYXABd1geAAAbWAAAEkZjdnQgK6gHnQAAMKgAAABUZnBnbXf4YKsAAC2gAAABvGdhc3AACAATAAIo0AAAAAxnbHlmJroL9AAAOxwAAelsaGRteFV6YHoAABZAAAAFGGhlYWT8atJ6AAABLAAAADZoaGVhCroKrgAAAWQAAAAkaG10eK5yj5cAAAIIAAAUOGxvY2GAd/+7AAAw/AAACh5tYXhwBz4DCQAAAYgAAAAgbmFtZeakFYkAAiSIAAAEJnBvc3T/bQBkAAIosAAAACBwcmVwomb6yQAAL1wAAAFJAAEAAAACIxKKf3BIXw889QAZCAAAAAAAxPARLgAAAADVAVL0+hv91QkwCHMAAAAJAAIAAAAAAAAAAQAAB2z+DAAACUn6G/5KCTAAAQAAAAAAAAAAAAAAAAAABQ4AAQAABQ4AjwAWAFQABQABAAAAAAAOAAACAAIkAAYAAQADBIYBkAAFAAAFmgUzAAABHwWaBTMAAAPRAGYCAAAAAgAAAAAAAAAAAOAAAv9QACBbAAAAIAAAAABHT09HAEAAAP/9BgD+AABmB5oCACAAAZ8AAAAABDoFsAAgACAAAwOMAGQAAAAAAAAAAAH7AAAB+wAAAg8AoAKPAIgE7QB3BH4AbgXcAGkE+QBlAWUAZwK8AIUCyAAmA3IAHASJAE4BkgAdAjUAJ
const matrixRatingColums = [
{ value: 1, text: '1' },
{ value: 2, text: '2' },
{ value: 3, text: '3' },
{ value: 4, text: '4' },
{ value: 5, text: '5' },
{ value: 6, text: '6' }
];
// ....
{ type: 'matrix', name: 'matrix',
@piscis
piscis / test.js
Last active October 22, 2016 17:19
{
type: "matrix",
columns: [
"Grade A",
"Grade B",
"Grade C",
"Grade D",
"Grade E",
"Grade F",
],
{
"filters": [{
"lang": [{"de": "XTAG (de)"}, {"en": "XTAG (EN)"}],
"key": "xtag"
}],
"projects": [{
"id": 1,
"description": "...",
"title": "...",
"tileUrl": "http://tile-url.example.org/tile.jpg",
@piscis
piscis / git_log.sh
Created August 21, 2015 17:57
Format git log
git log --pretty="format: - %h - %s (%cd)" --abbrev-commit --author="Alex"
@piscis
piscis / gulpfile.bable.js
Created July 14, 2015 09:59
Bable gulp file used to build and deploy a ReactJS app
import path from 'path';
import cp from 'child_process';
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import del from 'del';
import mkdirp from 'mkdirp';
import runSequence from 'run-sequence';
import webpack from 'webpack';
import minimist from 'minimist';
import {exec} from 'child_process';