This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: ruby | |
rvm: | |
- 2.2.0 | |
before_script: | |
- cp config/database.yml.travis config/database.yml | |
- psql -c 'create database travis_ci_test;' -U postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CoursesController < ApplicationController | |
def index | |
@semesters = Semester.all | |
@courses = Course.all | |
if params[:search].present? | |
@courses = @courses.search(params[:search]) | |
end | |
if params[:semester].present? | |
@courses = | |
@courses.joins(:course_instances) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BetterHash < Hash | |
def initialize(*args) | |
super { |_, _| raise KeyError } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = 3 % 1; def disp(text); puts text; end; puts 3 | |
disp('Hello World!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hash.new { |h, k| h[k] ||= 0 }[:kaboom!] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def compose(*functions): | |
assert functions | |
def f(*args, **kwargs): | |
return reduce(functions[1:], __call__, functions[0](*args, **kwargs)) | |
return f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ docker run -it --rm ubuntu:bionic /bin/bash -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends mysql-server-5.7" | |
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] | |
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] | |
Get:3 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [9282 B] | |
Get:4 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [866 kB] | |
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] | |
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] | |
Get:7 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB] | |
Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB] | |
Get:9 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [87.8 kB] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ docker run --rm -it itest | |
Creating replication sandbox | |
Installing and starting master | |
. sandbox server started | |
Installing and starting slave1 | |
. sandbox server started | |
Installing and starting slave2 | |
. sandbox server started | |
$HOME/sandboxes/gh-ost-test/initialize_slaves | |
initializing slave 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/go/vt/proto/vtgate/vtgate.pb.go b/go/vt/proto/vtgate/vtgate.pb.go | |
index 420d6e33c..8e4c6ab7a 100644 | |
--- a/go/vt/proto/vtgate/vtgate.pb.go | |
+++ b/go/vt/proto/vtgate/vtgate.pb.go | |
@@ -1,29 +1,51 @@ | |
+// | |
+//Copyright 2019 The Vitess Authors. | |
+// | |
+//Licensed under the Apache License, Version 2.0 (the "License"); | |
+//you may not use this file except in compliance with the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package strings | |
import ( | |
"bytes" | |
"fmt" | |
"strings" | |
"testing" | |
) | |
var ( |
OlderNewer