Skip to content

Instantly share code, notes, and snippets.

View jakemac53's full-sized avatar

Jacob MacDonald jakemac53

  • Google
  • Kenmore, WA
View GitHub Profile
@jakemac53
jakemac53 / main.dart
Created March 21, 2023 14:35
cylindrical-lantern-6201
void main() {
print(add << null << 1);
print(add << 1 << null);
print(add << 1 << 2);
}
int add(int a, int b) => a + b;
extension IfNotNull<R, T extends Object> on R Function(T)? {
R? operator <<(T? input) {
import 'package:analyzer/analyzer.dart';
main() {}

First, you will need to add a git dependency on pub to your pubspec.yaml:

dev_dependencies:
  pub:
    git:
      url: https://github.com/dart-lang/pub/
      ref: master
export 'package:guinness/guinness.dart'
- hide Expect, expect, NotExpect, beforeEach, it, iit, xit;
+ hide
+ Expect,
+ expect,
+ NotExpect,
+ beforeEach,
+ it,
+ iit,
+ xit,
@jakemac53
jakemac53 / gist:ff1dc6c1ff4ae6e72cdf
Created July 31, 2014 19:40
Empty hash link bug
<!DOCTYPE html>
<html>
<head>
<script src="//www.polymer-project.org/platform.js"></script>
<script src="http://www.polymer-project.org/polymer.js"></script>
<title>Hash Link Test</title>
</head>
@jakemac53
jakemac53 / googlemaps.xml
Created October 13, 2011 15:59
Backwards compatible plugin install file
<?xml version="1.0" encoding="utf-8"?>
<extension version="1.6.0" client="site" type="plugin" group="content" method="upgrade">
<name>Google Maps</name>
<author>Jacob MacDonald</author>
<creationDate>June 2010</creationDate>
<copyright></copyright>
<license>GNU/GPL</license>
<authorEmail>jake@yourstrategicedge.com</authorEmail>
<authorUrl>www.jacobmacdonald.com</authorUrl>
<version>2.0</version>