Skip to content

Instantly share code, notes, and snippets.

View Hecatoncheir's full-sized avatar
:octocat:
Focusing

Vitaliy Vostrikov Hecatoncheir

:octocat:
Focusing
View GitHub Profile
@Hecatoncheir
Hecatoncheir / w_circle_crop.dart
Created August 18, 2022 13:29 — forked from nhancv/w_circle_crop.dart
Flutter crop circles, background image, draggable, transparent hole
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:nft/services/safety/base_stateful.dart';
import 'package:nft/widgets/p_appbar_transparency.dart';
import 'package:path_provider/path_provider.dart';
@Hecatoncheir
Hecatoncheir / main.dart
Created May 8, 2022 17:16 — forked from eseidel/main.dart
Boid (bird-like flocking) simulation, inspired by https://www.youtube.com/watch?v=bqtqltqcQhw
import 'dart:ui';
import 'package:flutter/material.dart';
import 'dart:math';
const double kBoidVelocity = 5.0;
const double kBoidScale = 2.0;
const int kBoidCount = 100;
const double kBoidMaxAvoidSteerSpeed = .1;
// Angles above maxAlignAngle are treeted the same (caps the turn speed).
ffmpeg -y -i video.webm -vf palettegen palette.png
ffmpeg -y -i video.webm -i palette.png -filter_complex paletteuse -r 10 animation.gif
Source: http://www.ubuntubuzz.com/2017/08/convert-mp4-webm-video-to-gif-using-ffmpeg.html
@Hecatoncheir
Hecatoncheir / GitConfigHttpProxy.md
Created September 20, 2019 07:51 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@Hecatoncheir
Hecatoncheir / main.dart
Created March 25, 2019 20:39 — forked from MarcinusX/main.dart
Ripple effect transition
import 'package:flutter/material.dart';
import 'package:rect_getter/rect_getter.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Fab overlay transition',
@Hecatoncheir
Hecatoncheir / variable_sized_grid_view.dart
Created October 19, 2018 09:19 — forked from letsar/variable_sized_grid_view.dart
VariableSizedGridView for Flutter (Masonry style)
import 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
/// Signature for a function that creates a [TileSize] for a given index.
typedef TileSize IndexedTileSizeBuilder(int index);
/// Creates grid layouts with a fixed number of spans in the cross axis.
@Hecatoncheir
Hecatoncheir / .golang-example-gitlab-ci.yml
Created September 25, 2018 14:55 — forked from mikeatlas/.golang-example-gitlab-ci.yml
Example Go GitLab CI setup (no root/sudo required)
# See docs/examples
# http://doc.gitlab.com/ce/ci/quick_start/README.html
# http://doc.gitlab.com/ce/ci/yaml/README.html
# GitLab CI template for Go tests. Note this installs
# a new working copy of Go in a non-standard path such
# that sudo/root is not needed for the install stage.
# note that this particular install-environment stage
# is overly verbose in order to debug anything tricky
@Hecatoncheir
Hecatoncheir / golang.gitlab-ci.yml
Created September 24, 2018 19:52 — forked from npenkov/golang.gitlab-ci.yml
gitlab-ci for Go projects using go dep.
# Replace "projectname" and "username"
image: golang:1.9
variables:
BIN_NAME: projectname
ARTIFACTS_DIR: artifacts
GO_PROJECT: gitlab.com/username/projectname
stages:
- build
@Hecatoncheir
Hecatoncheir / main.go
Created August 19, 2018 10:24 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@Hecatoncheir
Hecatoncheir / gist:f0bb763f5fb96f932189017df3366545
Created April 20, 2017 10:39 — forked from booherbg/gist:f812c9145d157d8945b2
Cross compiling a simple go server for windows

How to build Golang windows/arm static binaries from linux

Alternate title: Cross compiling Windows/Darwin/Linux amd64/386/arm all from linux

After fumbling around trying to figure out the go toolchain and cross compilation configuration, I ran across the wiki page on Go's homepage. It's super helpful, and worked out of the box. I'm including the necessary scripts here in case they get changed or lost, and we can help Google find it (since it's the first real source I've found that "Just Worked"). http://code.google.com/p/go-wiki/wiki/WindowsCrossCompiling