I hereby claim:
- I am altamic on github.
- I am altamic (https://keybase.io/altamic) on keybase.
- I have a public key ASDy9j3AgLBSjJNaMELFUHSoo73UsnjBAlhkxyOpdAVyrwo
To claim this, I am signing this object:
# activate adb wifi connecting to a LAN device by IP | |
function adb-wifi { | |
if [ -z "$1" ] | |
then | |
echo "Usage:\nadb-wifi <device-ip>" | |
return 1 | |
fi | |
ADB_WIFI_TCP_PORT=5555 | |
adb tcpip $ADB_WIFI_TCP_PORT | |
adb connect "$1":$ADB_WIFI_TCP_PORT |
// | |
// StateMachine.swift | |
// | |
// Created by Michelangelo Altamore on 12/04/2018. | |
// Copyright © 2018 Michelangelo Altamore. All rights reserved. | |
// | |
import Foundation | |
protocol StateMachineInternals: class { |
#include <iostream> | |
// This is a rewrite of the technique showed here: | |
// http://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.html | |
// https://gist.github.com/dabrahams/1528856 | |
// Generate a static data member of type Stub::type in which to store | |
// the address of a private member. It is crucial that Stub does not | |
// depend on the /value/ of the the stored address in any way so that | |
// we can access it from ordinary code without directly touching |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# Example implementation of wc -l | |
(ARGV.length == 0 ? | |
[["", STDIN]] : | |
ARGV.lazy.map { |file_name| | |
[file_name, File.open(file_name)] | |
}) | |
.map { |file_name, file| |
# run an ad hoc http static server in your current directory (nobu) | |
ruby -run -ehttpd . -p8000 |
In 2009 Satoshi Nakamoto conceived Bitcoin, an electronic payment system based on cryptographic proof instead of trust. Bitcoin allow to make payments over a communications channel without a trusted party. In this post I will try to explain why its design choices are sound and fair.
Unless you are living on mars, you cannot avoid the amount of bad economic news on mainstream media, i.e. governments promoting either banks bailouts or bankrupt corporations too big to fail, hence running on larger and larger deficits, incresing taxes while cutting to the bone their services to population.
We are turned into thinking that the only way to escape our doomsday scenario is creating money i.e. a money expansion.
If you agree with the above principle, you are encouraged to adopt measures so that a such conduct can be effectively applied in your environment.
If you are a developer, be ready to point out (perhaps in writing) that you are willing to take full responsibility of your code and for this reason you are expected in some situation (i.e. insufficient technical experience, insufficient aptitude, etc.) to proclaim the impossibility to deliver code for ethical reasons conflicting with the principle. Reciprocally, you should have the right to know the position of each member of your team about the principle.
> Array.prototype.toObject = function() {b={}; for(i=0;i<this.length;i+=2) {b[this[i]]=this[i+1]}; return b;} | |
[Function] | |
> ["chiave1","valore1","chiave2","valore2"].toObject() | |
{ chiave1: 'valore1', chiave2: 'valore2' } |
class Hash | |
def to_xml | |
case keys.size | |
when 0 | |
"" | |
when 1 | |
result = nil | |
each_pair do |k, v| | |
case v | |
when nil then result = "<#{k.to_s}/>" |