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
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: aws-s3-import | |
spec: | |
backoffLimit: 4 | |
template: | |
spec: | |
containers: | |
- name: aws-cli |
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
import org.jruby.*; | |
import org.jruby.ast.executable.AbstractScript; | |
import org.jruby.ast.executable.RuntimeCache; | |
import org.jruby.internal.runtime.methods.CallConfiguration; | |
import org.jruby.javasupport.util.RuntimeHelpers; | |
import org.jruby.runtime.*; | |
import org.jruby.runtime.builtin.IRubyObject; | |
public class person extends AbstractScript | |
{ |
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
Accessing a server port through another server | |
ssh -N -L<local_port>:<server>:<port> <another_server> |
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
True = ->(a,b) {a} | |
False = ->(a,b) {b} | |
#Church encodings | |
zero = ->(f){->(x) {x}} | |
one = ->(f){->(x) { f.(x)}} | |
two = ->(f){->(x) { f.(f.(x))}} | |
three =->(f){->(x) { f.(f.(f.(x)))}} | |
#operations |
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
public class ReflectionUtils { | |
public static <T> T allocate(Class<?> clazz) { | |
Object instance = null; | |
Object unsafe = getUnsafe(); | |
Method allocate; | |
try { | |
allocate = unsafe.getClass().getDeclaredMethod("allocateInstance", Class.class); | |
instance = allocate.invoke(unsafe, clazz); | |
} catch (Exception e) { |
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
import java.lang.reflect.Field; | |
import sun.misc.Unsafe; | |
import sun.reflect.FieldAccessor; | |
import sun.reflect.ReflectionFactory; | |
public class Teste { | |
static { | |
try { | |
setValor(Boolean.class, "TRUE", new Boolean(false)); |
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
[alias] | |
update = !sh -c \"git fetch && git rebase origin/$(git symbolic-ref HEAD | sed -e \"s,.*/\\(.*\\),\\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
douglas@douglas-laptop:~/projetos/dm-hibernate-adapter$ rmvn rake spec | |
maven commandline: de.saumya.mojo:rake-maven-plugin:rake -Dargs="spec" -f dm-hibernate-adapter.gemspec.pom | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building dm-hibernate-adapter 0.3pre | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- rake-maven-plugin:0.28.1:rake (default-cli) @ dm-hibernate-adapter --- | |
[WARNING] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version). |
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
douglas@douglas-laptop:~/projetos/randexp$ rake | |
rake/gempackagetask is deprecated. Use rubygems/package_task instead | |
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) | |
Example disabled: should be a union between 3 sexp's | |
Example disabled: should return a word or a 3 digit number | |
Regexp#gen | |
- should always return a string | |
Randexp::Parser.parse |
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
douglas@douglas-laptop:~/projetos/randexp$ jruby -S rake | |
rake/gempackagetask is deprecated. Use rubygems/package_task instead | |
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead. | |
at /home/douglas/.rvm/gems/jruby-1.6.4/gems/rake-0.9.2.2/lib/rake/rdoctask.rb | |
rm -r coverage | |
/home/douglas/.rvm/gems/jruby-1.6.4/gems/rcov-0.9.11-java/lib/rcov/differential_analyzer.rb:31 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag | |
Regexp#gen | |
- should always return a string |
NewerOlder