Skip to content

Instantly share code, notes, and snippets.

View Keksinautin's full-sized avatar

Ivan Evsikov Keksinautin

  • Product Science
  • London
  • 08:16 (UTC +01:00)
  • LinkedIn in/evsikov
View GitHub Profile
@Keksinautin
Keksinautin / main.dart
Last active January 9, 2019 13:52
Error: A value of type 'int' can't be assigned to a parameter of type 'FutureOr<int>'.
import 'dart:async';
class A {
final FutureOr<int> a;
const A({this.a: 2});
}
void main() async {
final b = const A(); // Here we have an error;
@Keksinautin
Keksinautin / nginx.conf
Created August 28, 2018 21:07 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# Advanced config for NGINX
server_tokens off;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
@Keksinautin
Keksinautin / main.dart
Created June 27, 2018 08:28
What is the right way here?
void main() {
final a = ['11', '22', '33'];
final m = new Map<String, int>.fromIterable(
a,
key: (String s) => s.substring(1),
value: (String s) => s.codeUnitAt(0),
);
print(m);