I hereby claim:
- I am endorama on github.
- I am endorama (https://keybase.io/endorama) on keybase.
- I have a public key ASAKweB5myH-17sUIf-UoqlzUNopDTCLTcUzK4hV3tW7kgo
To claim this, I am signing this object:
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') | |
begin | |
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME'])) | |
rvm_lib_path = File.join(rvm_path, 'lib') | |
#$LOAD_PATH.unshift rvm_lib_path | |
require 'rvm' | |
RVM.use_from_path! File.dirname(File.dirname(__FILE__)) | |
rescue LoadError | |
# RVM is unavailable at this point. | |
raise "RVM ruby lib is currently unavailable." |
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') | |
begin | |
require 'rvm' | |
RVM.use_from_path! File.dirname(File.dirname(__FILE__)) | |
rescue LoadError | |
# RVM is unavailable at this point. | |
raise "RVM ruby lib is currently unavailable." | |
end | |
end |
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
SCRIPT="$(readlink --canonicalize-existing "$0")" | |
SCRIPTPATH="$(dirname "$SCRIPT")" | |
SCRIPTNAME="$(basename "$SCRIPT")" | |
# Thanks https://dev.to/thiht/shell-scripts-matter :) | |
# set -x if DEBUG env var is set - any value suffice | |
[ -z "${DEBUG:-}" && set -x |
/* | |
* Angular LoadScript | |
* | |
* Let angular load and execute lazy javascript from partials! | |
* | |
* This module is the result of this issue: "1.2.0rc1 regression: script tags not loaded via ngInclude" | |
* Issue url: https://github.com/angular/angular.js/issues/3756 | |
* | |
* As of Angular 1.2.0 the ngInclude scripts does not permit execution of javascript from included partials. | |
* This little module execute code inside script tags with "javascript-lazy" attribute after partial loading, |
(function() { | |
"use strict"; | |
var module = angular.module('foo'); | |
module.factory('fooFactory', [ | |
function() { | |
// Define the constructor function. | |
function FooClass() {} | |
// define application namespace ( this is window ) | |
this.Namespace = this.Namespace || {}; | |
(function() { | |
"use strict"; | |
function Foobar() {}; | |
var p = Foobar.prototype; // = new Object(); // to extend Foobar |
{ | |
[...] | |
addWithData: function(msg, data) { | |
var copy = angular.copy(data); | |
this.maskReserved(copy); | |
$log.debug(msg + ' :: ' + copy, type); | |
}, | |
maskReserved: function(obj) { |
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
# SCRIPT="$(readlink --canonicalize-existing "$0")" | |
# SCRIPTPATH="$(dirname "$SCRIPT")" | |
# SCRIPTNAME="$(basename "$SCRIPT")" |
I hereby claim:
To claim this, I am signing this object:
# Demo of command line arguments | |
# ARGV[0]: First command line argument | |
# (not the executable name) | |
# ARGV is an array of strings | |
puts "Number of command line arguments: #{ARGV.size}" | |
ARGV.each_with_index {|arg, i| puts "Argument #{i}: #{arg}"} | |
# The executable name is available as PROGRAM_NAME | |
puts "Executable name: #{PROGRAM_NAME}" |