Skip to content

Instantly share code, notes, and snippets.

View bounded.scala
trait Bounded[T <: Bounded[T]] {
self: T =>
}
trait BoundedFactory[V, B <: Bounded[B]] {
def build(b: B): V
}
case class Box[V](value: V) extends Bounded[Box[V]]
class BoxFactory[T] extends BoundedFactory[T, Box[T]] {
def build(b: Box[T]) = b.value
}
View atom-packages.txt
advanced-open-file@0.14.3
atom-material-syntax@0.4.5
atom-material-syntax-light@0.4.4
atom-material-ui@1.2.10
clipboard-plus@0.5.1
color-picker@2.1.1
file-icons@1.6.19
git-plus@5.13.0
imdone-atom@1.3.29
markdown-preview-plus@2.3.0
View gist:c29f48f52493cc18b647
root@localhost[(none)]> create database strict_test;
Query OK, 1 row affected (0.00 sec)
root@localhost[(none)]> use strict_test;
Database changed
root@localhost[strict_test]> SET NAMES utf8mb4;
Query OK, 0 rows affected (0.00 sec)
root@localhost[strict_test]> SET @@SESSION.sql_mode = 'TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY';
Query OK, 0 rows affected (0.00 sec)
View chemr-indexer.jquery.js
indexer = {
id: 'jquery',
name: 'jQuery',
color: '#0769AD',
index: function (ctx) {
return ctx.fetchDocument('http://api.jquery.com/').then(function (doc) {
var links = Array.from(
doc.querySelectorAll('.entry-title > a')
);
links.forEach(function (l) {
View last.pl
#!/usr/bin/env perl
use strict;
use warnings;
package p {
sub f {
if (1) {
warn 'if';
last;
View check-git-repo-dirty
#!/bin/bash
set -e
repo_sig=$1
repos_root="$(ghq root)"
repo_path="${repos_root}/${repo_sig}"
if [[ ! -d "$repo_path/.git" ]]; then
echo "! ${repo_path} is not a Git repository" >&2
View gist:ba9ec82daca9b1cd7662
✘╹◡╹✘ < for char in {a..z}; do; which $char; done;
a not found
b not found
c not found
d not found
e not found
f not found
g not found
h not found
i not found
View 00_result.txt
✘╹◡╹✘ < sbt run
[info] Set current project to scala-playground (in build file:/Users/aereal/devel/src/github.com/aereal/scala-playground/)
[info] Compiling 1 Scala source to /Users/aereal/devel/src/github.com/aereal/scala-playground/target/scala-2.11/classes...
[error] /Users/aereal/devel/src/github.com/aereal/scala-playground/App.scala:7: not found: type ?
[error] val v = Applicative[ValidationNel[String, ?]]
[error] ^
[error] /Users/aereal/devel/src/github.com/aereal/scala-playground/App.scala:7: scalaz.ValidationNel[String,<error>] takes no type parameters, expected: one
[error] val v = Applicative[ValidationNel[String, ?]]
[error] ^
[error] /Users/aereal/devel/src/github.com/aereal/scala-playground/App.scala:7: ambiguous implicit values: