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
class BasicObject | |
def __arguments__(bdg) | |
method_symbol = caller(1,1).first.match(/\`(?<name>[^']*)'/)[:name].to_sym | |
self.method(method_symbol).parameters.map { |e| [e[1], bdg.local_variable_get(e[1])] } | |
end | |
end | |
def foo(a, b='c', *d, e:, f: "foo", **g) | |
__arguments__(binding) | |
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
HHVM_VERSION_REGEXP = / | |
(?:hhvm$) | |
|( | |
hhvm-( | |
(?<numeric>\d+(\.\d+)*)(?<lts>-lts)?$ | |
| | |
(?<version> | |
dbg$| | |
dev$| | |
nightly$| |
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
foo@ecf00eb298cc:~$ rvm use --install --binary --fuzzy jruby-9.2.5.0 | |
Required jruby-9.2.5.0 is not installed - installing. | |
Searching for binary rubies, this might take some time. | |
Found remote file https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.5.0/jruby-dist-9.2.5.0-bin.tar.gz | |
Checking requirements for ubuntu. | |
Installing requirements for ubuntu. | |
Updating systemfoo password required for 'apt-get --quiet --yes update': | |
.... | |
Installing required packages: patch, bzip2, gawk, g++, make, openjdk-8-jre-headless............................................................ | |
Requirements installation successful. |
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
$ brew install gnu-tar | |
==> Downloading https://homebrew.bintray.com/bottles/gnu-tar-1.30.high_sierra.bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring gnu-tar-1.30.high_sierra.bottle.tar.gz | |
==> Caveats | |
gnu-tar has been installed as "gtar". | |
If you really need to use it as "tar", you can add a "gnubin" directory | |
to your PATH from your bashrc like: |
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
$ curl -H "Travis-API-version: 3" -H "Authorization: token $(travis token --org)" https://api.travis-ci.org/repo/travis-ci%2fphp-src-builder/builds?event_type=cron | |
{ | |
"@type": "builds", | |
"@href": "/repo/travis-ci%2fphp-src-builder/builds?event_type=cron", | |
"@representation": "standard", | |
"@pagination": { | |
"limit": 25, | |
"offset": 0, | |
"count": 0, | |
"is_first": true, |
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
Unable to find image 'quay.io/travisci/travis-jvm:latest' locally | |
latest: Pulling from travisci/travis-jvm | |
f0a98344d604: Already exists | |
4aec07c74624: Already exists | |
2d19892c698f: Already exists | |
27f1e965b4ef: Already exists | |
a3ed95caeb02: Already exists | |
b7d30a7463b4: Already exists | |
fa09c141fad8: Already exists | |
90c3e87bd2cf: Already exists |
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
strokkur[~]$ rbenv global 2.3.4 | |
strokkur[~]$ irb | |
irb(main):001:0> "a\nb" | |
=> "a\nb" | |
irb(main):002:0> exit | |
strokkur[~]$ pry | |
[1] pry(main)> "a\nb" | |
=> "a\nb" | |
[2] pry(main)> exit |
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 'rubygems' | |
require 'opencv' | |
include OpenCV | |
camera = CvCapture.open(1) | |
window = GUI::Window.new("camera") | |
while true |
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
#!/bin/bash | |
if [[ -s //etc/profile ]]; then | |
source //etc/profile | |
fi | |
if [[ -s $HOME/.bash_profile ]] ; then | |
source $HOME/.bash_profile | |
fi | |
ANSI_RED="\033[31;1m" |
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
$ curl -vIL https://status.github.com | |
* Rebuilt URL to: https://status.github.com/ | |
* Trying 50.16.242.83... | |
* Connected to status.github.com (50.16.242.83) port 443 (#0) | |
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | |
* Server certificate: status.github.com | |
* Server certificate: DigiCert SHA2 High Assurance Server CA | |
* Server certificate: DigiCert High Assurance EV Root CA | |
> HEAD / HTTP/1.1 | |
> Host: status.github.com |
NewerOlder