Skip to content

Instantly share code, notes, and snippets.

View aereal's full-sized avatar

aereal aereal

View GitHub Profile
@aereal
aereal / uri-regexp
Created June 1, 2016 09:56
ruby -ruri -e 'puts URI.regexp'
(?x-mi:
([a-zA-Z][\-+.a-zA-Z\d]*): (?# 1: scheme)
(?:
((?:[\-_.!~*'()a-zA-Z\d;?:@&=+$,]|%[a-fA-F\d]{2})(?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*) (?# 2: opaque)
|
(?:(?:
\/\/(?:
(?:(?:((?:[\-_.!~*'()a-zA-Z\d;:&=+$,]|%[a-fA-F\d]{2})*)@)? (?# 3: userinfo)
(?:((?:(?:[a-zA-Z0-9\-.]|%\h\h)+|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:(?:[a-fA-F\d]{1,4}:)*[a-fA-F\d]{1,4})?::(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)\]))(?::(\d*))?))? (?# 4: host, 5: port)
|
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
}
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

見出し

オハヨッ

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)
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) {
@aereal
aereal / last.pl
Last active February 17, 2016 05:39
#!/usr/bin/env perl
use strict;
use warnings;
package p {
sub f {
if (1) {
warn 'if';
last;
お姉ちゃん
#!/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