Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
@immutable
class ClipShadowPath extends StatelessWidget {
final Shadow shadow;
final CustomClipper<Path> clipper;
final Widget child;
ClipShadowPath({
@required this.shadow,
@vlad-yaremenko
vlad-yaremenko / .vimrc
Last active March 5, 2018 06:30
My vim config
execute pathogen#infect()
set nowrap " Disable text wrap
syntax on " Enable syntax processing
filetype plugin indent on " Load filetype specific indent files
set tabstop=2 " Show existing tab with 2 spaces width
set shiftwidth=2 " When indenting with '>', use 2 spaces width
set softtabstop=2 " When indenting with '>', use 2 spaces width
set expandtab " On pressing tab, insert 2 spaces
function createHttpObject() {
var httpObject;
if(window.XMLHttpRequest) {
try {
httpObject = new XMLHttpRequest();
} catch(e) {
httpObject = false;
}
} else if(window.ActiveXObject) {
@vlad-yaremenko
vlad-yaremenko / find-in-json.js
Created April 22, 2016 13:17 — forked from iwek/find-in-json.js
Searching through JSON
//return an array of objects according to key, value, or key and value matching
function getObjects(obj, key, val) {
var objects = [];
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (typeof obj[i] == 'object') {
objects = objects.concat(getObjects(obj[i], key, val));
} else
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not)
if (i == key && obj[i] == val || i == key && val == '') { //