Skip to content

Instantly share code, notes, and snippets.

View av's full-sized avatar
💻
🌚

Ivan Charapanau av

💻
🌚
View GitHub Profile
@av
av / main.dart
Created January 13, 2020 15:38
Flutter: neu
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(bevel),
color: Colors.grey.shade200,
boxShadow: [
BoxShadow(
blurRadius: bevel,
offset: -blurOffset,
color: Colors.white,
),
@av
av / main.dart
Created January 13, 2020 15:05
Flutter: neu
// In NeumorphicContainer.build
// ...
return Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(width: bevel, color: Color(0xFFFFFFFFFF)),
left: BorderSide(width: bevel, color: Color(0xFFFFFFFFFF)),
right: BorderSide(width: bevel, color: Color(0xFFFF000000)),
bottom: BorderSide(width: bevel, color: Color(0xFFFF000000)),
),
@av
av / main.dart
Last active January 13, 2020 15:04
Flutter: neu
// In NeumorphicContainer
// ...
// New property
final double bevel;
// Also adding initializer to a constructor
const NeumorphicContainer({
Key key,
this.child,
@av
av / Container.dart
Last active January 13, 2020 14:51
Flutter: neu
// flutter:widgets/container.dart
// in Container
// ...
@override
Widget build(BuildContext context) {
Widget current = child;
if (decoration != null) {
current = DecoratedBox(...);
@av
av / main.dart
Last active January 13, 2020 15:37
Flutter: neu
class NeumorphicContainer extends StatelessWidget {
final Widget child;
NeumorphicContainer({Key key, this.child}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: child,
);
@av
av / main.dart
Created January 13, 2020 14:28
Flutter: neu
import 'package:flutter/material.dart';
void main() => runApp(NeumorphicApp());
class NeumorphicApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Neumorphic App',
theme: ThemeData(
@av
av / twitter.js
Created November 22, 2019 11:53
Now: twi-bot, twitter service
const Twitter = require('twitter-lite');
const {
CONSUMER_KEY,
CONSUMER_SECRET,
ACCESS_TOKEN_KEY,
ACCESS_TOKEN_SECRET,
} = process.env;
const client = new Twitter({
subdomain: 'api',
@av
av / search.sh
Created November 21, 2019 22:26
Now: twi-bot, twitter lite
npm search twitter lite
NAME | DESCRIPTION | AUTHOR | DATE | VERSION | KEYWORDS
bootstrap-lite | this… | =kaizhu | 2019-01-30 | 2019.1.… |
bootstrap3-lite | this… | =kaizhu | 2019-01-30 | 2019.1.… |
twitter-lite | Tiny, full-featured… | =peterpme | 2019-03-26 | 0.9.4 | twitter rest api twitter api node-twitter twitter oauth twitter rest twitter stream
twitter-rest-lite | Twitter's REST API… | =ghostbar | 2014-07-27 | 0.3.8 | twitter api rest
twitter-scroller | Scrape more tweets… | =eyqs | 2018-01-23 | 2.0.0 | twitter scrape scraper scraping web-scraper
ep_sociallinks | Social links for… | =0ip =framasky… | 2013-10-06 | 1.0.2 | twitter facebook sharethis social
ep_twitter_links | Adds twitter links… | =0ip =framasky… | 2012-06-16 | 0.0.3 |
@av
av / index.js
Created November 21, 2019 22:03
Now: twi-bot-high-level
praise = praiser.generate();
twitter.post(praise);
@av
av / main.dart
Created October 31, 2019 12:32
Flutter: sample particle benchmark
particle: ParticleGenerator(
2000,
(i) => Aligned(
alignment: Randoms.alignment(),
child: MovingParticle(
from: Offset.zero,
to: Randoms.offsetFromSize(const Size(100, 100)),
child: Circle(),
),
),