Skip to content

Instantly share code, notes, and snippets.

Albert Lacambra Basil alacambra

Block or report user

Report or block alacambra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:4f7d3e2c488bf4282c22d9910e3bb54d
2018-10-25 19:45:14.055 UTC [gossip/state] commitBlock -> ERRO 0b3 Got error while committing(unexpected Previous block hash. Expected PreviousHash = [2e2048fcf6bcc4d99c210d7cdd99e135e0de419e35d6ccc7f5a1d58e25bc6ad0], PreviousHash referred in the latest block= [19ee18412db71ea5ddbc52a9e6fd4d8a56c8de695e15f7755e2dd3db7b675370]
github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage.(*blockfileMgr).addBlock
/opt/gopath/src/github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage/blockfile_mgr.go:254
github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage.(*fsBlockStore).AddBlock
/opt/gopath/src/github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage/fs_blockstore.go:43
github.com/hyperledger/fabric/core/ledger/ledgerstorage.(*Store).CommitWithPvtData
/opt/gopath/src/github.com/hyperledger/fabric/core/ledger/ledgerstorage/store.go:124
github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).CommitWithPvtData
/opt/gopath/src/github.com/hyperledger/fabric/co
View Promises
new Promise(function (resolve, reject) {
resolve("my data");
reject("my error");
})
.then((data) => ho(data, 1)
// , err => {
// he(err, 1);
// return Promise.reject(err)
// }
View RX
import rx.Emitter;
import rx.Observable;
import rx.observables.GroupedObservable;
import java.util.*;
import java.util.function.Consumer;
/**
* Created by alacambra on 19/12/2016.
*/
View cli
###DB security domain
batch
/subsystem=security/security-domain=poolingpeopledomain/:add
/subsystem=security/security-domain=poolingpeopledomain:write-attribute(name=cache-type,value=default)
/subsystem=security/security-domain=poolingpeopledomain/authentication=classic:\
add( \
login-modules=[{ \
"code"=>"Database", \
"flag"=>"required", \
"module-options"=>[ \
View gist:5bbe1a1298f6a12296e0
------- DEPLOYMENT SERVER WS CONFIG ------------
server {
listen 0.0.0.0:80;
server_name {DOMAIN};
location / {
proxy_pass http://{TARGET}:{PORT}/;
}
location ~*/ws/chats/(.*) {
@alacambra
alacambra / aliases
Last active Apr 25, 2017
bashrc and bash_aliases
View aliases
### DOCKER ####
alias sshadd="eval 'ssh-agent -s'"
alias deleteContainerDocker='docker rm $(docker ps -a -q)'
alias deleteImagesDocker='docker rmi $(docker images -q)'
alias testPoolingpeopleWildFly9992Tunnel='ssh -N -L 9992:127.0.0.1:9990 ubuntu@test.poolingpeople.com'
alias testPoolingpeopleNeo7475Tunnel='ssh -N -L 7475:127.0.0.1:7474 ubuntu@test.poolingpeople.com'
View gist:6fbacf09a9c25c285b4a
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 331.20 (buildd@roseapple) Mon Feb 3 15:07:22 UTC 2014
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 304.88 (buildmeister@swio-display-x86-rhel47-06) Wed Mar 27 15:32:58 PDT 2013
# commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section "InputDevice"
#
# # generated from default
View gist:1e984bf8f897295b1835
ssh -N -L 9992:127.0.0.1:9990 -i bitnami-hosting.pem bitnami@xyz.bitnamiapp.com
ssh -N -L 8081:127.0.0.1:8080 136.243.8.203
@alacambra
alacambra / gist:966a8b967f25724808a4
Created Oct 23, 2014
complete cypher with foreach
View gist:966a8b967f25724808a4
//Date ranges in a month
WITH
range(1, 28) as Days_28,
range(1, 29) as Days_29,
range(1, 30) as Days_30,
range(1, 31) as Days_31
//Assign months date ranges
WITH
Days_31 as January,
You can’t perform that action at this time.