I hereby claim:
- I am filipesperandio on github.
- I am filipesperandio (https://keybase.io/filipesperandio) on keybase.
- I have a public key whose fingerprint is 4DE3 6277 76E2 33AF 5077 3663 AF5F 43FE A9DB D87C
To claim this, I am signing this object:
| var directiveFunction = function() { | |
| return function(scope, element, att) { | |
| console.log(scope); //scope is the real angular scope related to that DOM element | |
| console.log(element); //element is a jquery like object and has a subset of jquery functions -> http://docs.angularjs.org/api/angular.element | |
| console.log(att); //att has the attributes you pass on the directive | |
| console.log(att.something); // fulano | |
| } | |
| }; | |
| module.directive("something", directiveFunction ); |
| require "sinatra/activerecord/rake" | |
| require "./your_app" | |
| task :routes do | |
| ["GET", "POST", "PUT", "DELETE"].each do |verb| | |
| routes = Sinatra::Application.routes[verb] || [] | |
| routes.as_json.flatten.each do |params| | |
| puts params["route_name"] if params.is_a? Hash | |
| end | |
| end |
| class Parent { | |
| def fieldA | |
| Map asMap() { | |
| this.class.declaredFields.findAll { !it.synthetic }.collectEntries { | |
| ["${it.name}": this[it.name]] | |
| } | |
| } | |
| } |
| #!/usr/bin/env bash | |
| echo "Installing docker" | |
| wget -qO- https://get.docker.com/ | sudo sh | |
| sudo usermod -aG docker filipesperandio | |
| echo "Installing SMB/CIFS and local net discovery" | |
| sudo apt-get install cifs-utils pyNeighborhood | |
| echo "Mounting NAS" |
| #!/usr/bin/env bash | |
| SERVER=$1 | |
| ssh $SERVER mkdir -p .ssh | |
| cat ~/.ssh/id_rsa.pub | ssh $SERVER "cat >> .ssh/authorized_keys" |
I hereby claim:
To claim this, I am signing this object:
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| ol, li { | |
| margin: 0; | |
| padding: 0; | |
| } |
| private void shceduleSomething() { | |
| final Handler handler = new Handler(); | |
| Timer timer = new Timer(); | |
| TimerTask doAsynchronousTask = new TimerTask() { | |
| @Override | |
| public void run() { | |
| handler.post(new Runnable() { | |
| public void run() { | |
| doSomething(); | |
| } |
| static { | |
| RxAndroidPlugins rxAndroidPlugins = RxAndroidPlugins.getInstance(); | |
| rxAndroidPlugins.reset(); | |
| rxAndroidPlugins.registerSchedulersHook(new RxAndroidSchedulersHook() { | |
| @Override | |
| public Scheduler getMainThreadScheduler() { | |
| return Schedulers.immediate(); | |
| } | |
| }); | |
| } |
| function arrayEquals(actual, expected) { | |
| return actual.every(function(element, i) { | |
| if (Array.isArray(element)) { | |
| return arrayEquals(element, expected[i]); | |
| } | |
| return element === expected[i]; | |
| }) | |
| } | |
| function flatten (arr) { |