This file contains hidden or 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/examples/diagnostics.cr b/examples/diagnostics.cr | |
| index 3e1a86a..6266e54 100644 | |
| --- a/examples/diagnostics.cr | |
| +++ b/examples/diagnostics.cr | |
| @@ -7,8 +7,8 @@ $font : SF::Font | |
| $font = SF::Font.from_file("resources/font/Ubuntu-R.ttf") | |
| $window = SF::RenderWindow.new( | |
| - SF.video_mode(800, 600), "Diagnostic information", | |
| - settings: SF.context_settings(depth: 24, antialiasing: 8) |
This file contains hidden or 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
| print("Starting...") | |
| import sys | |
| import collections | |
| import itertools | |
| import subprocess | |
| from PyQt5.QtWidgets import QApplication | |
| app = QApplication(sys.argv) |
This file contains hidden or 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
| last_duration = last_return = 0 | |
| orig_append = __xonsh_history__.append | |
| def append(cmd): | |
| nonlocal last_duration, last_return | |
| last_return = cmd['rtn'] | |
| a, b = cmd['ts'] | |
| last_duration = b - a | |
| orig_append(cmd) | |
| __xonsh_history__.append = append |
This file contains hidden or 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
| require "spec" | |
| require "power_assert" | |
| require "json" | |
| describe JSON::Any do | |
| describe "casts" do | |
| it "gets nil" do | |
| assert JSON.parse("null").as_nil == nil | |
| end |
This file contains hidden or 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
| FFFFF | |
| Failures: | |
| 1) JSON::Any gets float | |
| Failure/Error: assert JSON.parse("123.45").as_f32 == 123.45 | |
| assert JSON.parse("123.45").as_f32 == 123.45 | |
| | | | | |
| | | false : Bool |
This file contains hidden or 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
| set -e | |
| cd /tmp | |
| dd if=/dev/zero of=ceph_fs bs=1024 count=3145728 # 3 GiB | |
| sudo losetup /dev/loop0 || sudo losetup /dev/loop0 ceph_fs | |
| sudo mkfs.btrfs -f /dev/loop0 | |
| cd /path/to/ceph/src/ | |
| sudo mount /dev/loop0 dev | |
| sudo mount /dev/loop0 run | |
| sudo chown -R $USER: dev run |
This file contains hidden or 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
| last_duration = 0 | |
| _orig = __xonsh_history__.append | |
| def _append(cmd): | |
| nonlocal last_duration | |
| last_duration = cmd['ts'][1] - cmd['ts'][0] | |
| _orig(cmd) | |
| __xonsh_history__.append = _append |
This file contains hidden or 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 succ(s): | |
| a = list(s) | |
| for i in reversed(range(len(a))): | |
| a[i] = chr(ord(a[i]) + 1) | |
| if a[i] <= 'z': | |
| break | |
| a[i] = 'a' | |
| else: | |
| a.insert(0, 'a') | |
| return ''.join(a) |
This file contains hidden or 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
| require "compiler/crystal/syntax" | |
| def transform_eval(source) | |
| ast = Crystal::Parser.parse(source) | |
| unless ast.is_a?(Crystal::Expressions) | |
| ast = Crystal::Expressions.new([ast]) | |
| end | |
| exprs = (ast as Crystal::Expressions).expressions |
This file contains hidden or 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
| # nvidia-settings: X configuration file generated by nvidia-settings | |
| # nvidia-settings: version 355.11 (buildmeister@swio-display-x86-rhel47-07) Wed Aug 26 17:14:39 PDT 2015 | |
| # nvidia-xconfig: X configuration file generated by nvidia-xconfig | |
| # nvidia-xconfig: version 355.11 (buildmeister@swio-display-x86-rhel47-07) Wed Aug 26 17:15:49 PDT 2015 | |
| Section "ServerLayout" | |
| Identifier "Layout0" | |
| Screen 0 "Screen0" 0 0 | |
| InputDevice "Keyboard0" "CoreKeyboard" |