Skip to content

Instantly share code, notes, and snippets.

Alex piscis

Block or report user

Report or block piscis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main.dart
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 Mar 5, 2018
List of English salutations by % of usage
View 01-salutations.md

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

@piscis
piscis / batchload.js
Created Jun 21, 2017
Batch loading font files react native
View batchload.js
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
View test.js
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',
View test.js
{
type: "matrix",
columns: [
"Grade A",
"Grade B",
"Grade C",
"Grade D",
"Grade E",
"Grade F",
],
View projects.json
{
"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 Aug 21, 2015
Format git log
View git_log.sh
git log --pretty="format: - %h - %s (%cd)" --abbrev-commit --author="Alex"
@piscis
piscis / gulpfile.bable.js
Created Jul 14, 2015
Bable gulp file used to build and deploy a ReactJS app
View gulpfile.bable.js
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';
@piscis
piscis / env.js
Created Jul 6, 2015
loadRemoteFile JSON test
View env.js
var assert = require('assert');
describe('Environment test', function(){
it('It should not fail', function(){
assert.equal(1,1);
});
});
@piscis
piscis / SassMeister-input.scss
Created Jun 1, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@function convert($value, $currentUnit, $convertUnit){
@if $currentUnit == px{
@if $convertUnit == ems{
@return $value / 16+em;
You can’t perform that action at this time.