Skip to content

Instantly share code, notes, and snippets.

View ader1990's full-sized avatar

Adrian Vladu ader1990

View GitHub Profile
@ader1990
ader1990 / gist:6430200
Created September 3, 2013 22:02
ubuntu-12.04.3-server-cloudimg on openstack-grizzly-rdo(hyper-v) boot.log metadata is got from the config-drive, attached as the second disk
ubuntu@ubuntu-vhd1:~$ cat /var/log/boot.log
cloud-init start-local running: Tue, 03 Sep 2013 21:26:42 +0000. up 44.47 seconds
no instance data found in start-local
ci-info: lo : 1 127.0.0.1 255.0.0.0 .
ci-info: eth0 : 1 10.0.2.2 255.255.255.0 fa:16:3e:ea:55:0d
ci-info: route-0: 0.0.0.0 10.0.2.1 0.0.0.0 eth0 UG
ci-info: route-1: 10.0.2.0 0.0.0.0 255.255.255.0 eth0 U
cloud-init start running: Tue, 03 Sep 2013 21:26:46 +0000. up 49.27 seconds
found data source: DataSourceConfigDrive [net,ver=2][source=/dev/sdb]
2013-09-03 21:26:48,963 - __init__.py[WARNING]: Unhandled non-multipart userdata ''
2014-04-01 19:58:33.756 2636 DEBUG nova.servicegroup.api [-] ServiceGroup driver defined as an instance of db __new__ C:\Program Files (x86)\Cloudbase Solutions\OpenStack\Nova\Python27\lib\site-packages\nova\servicegroup\api.py:62
2014-04-01 19:58:34.522 2636 INFO nova.openstack.common.periodic_task [-] Skipping periodic task _periodic_update_dns because its interval is negative
2014-04-01 19:58:34.828 2636 DEBUG stevedore.extension [-] found extension EntryPoint.parse('file = nova.image.download.file') _load_plugins C:\Program Files (x86)\Cloudbase Solutions\OpenStack\Nova\Python27\lib\site-packages\stevedore\extension.py:156
2014-04-01 19:58:34.864 2636 DEBUG stevedore.extension [-] found extension EntryPoint.parse('file = nova.image.download.file') _load_plugins C:\Program Files (x86)\Cloudbase Solutions\OpenStack\Nova\Python27\lib\site-packages\stevedore\extension.py:156
2014-04-01 19:58:34.864 2636 INFO nova.virt.driver [-] Loading compute driver 'nova.virt.hyperv.driver.HyperVDriver'
2014-04-01 19:58:35
2014-05-04 10:58:40 INFO juju.cmd supercommand.go:296 running juju-1.19.1-win2012r2-amd64 [gc]
2014-05-04 10:58:40 INFO juju.cmd supercommand.go:296 running juju-1.19.1-win2012r2-amd64 [gc]
2014-05-04 10:58:40 INFO juju.cmd.jujud machine.go:143 machine agent machine-6 start (1.19.1-win2012r2-amd64 [gc])
2014-05-04 10:58:40 DEBUG juju.agent agent.go:370 read agent config, format "1.18"
2014-05-04 10:58:40 INFO juju.worker runner.go:260 start "api"
2014-05-04 10:58:40 INFO juju.worker runner.go:260 start "statestarter"
2014-05-04 10:58:40 INFO juju.worker runner.go:260 start "termination"
2014-05-04 10:58:40 INFO juju.state.api apiclient.go:198 dialing "wss://192.168.47.52:17070/"
2014-05-04 10:58:40 INFO juju.state.api apiclient.go:144 connection established to "wss://192.168.47.52:17070/"
2014-05-04 10:58:40 INFO juju.state.api apiclient.go:198 dialing "wss://192.168.47.52:17070/"
SERVICE_NAME: jujud-unit-win-nothing-0
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : "C:/Juju/lib/juju/tools/unit-win-nothing-0/JujuServ
ice.exe" "jujud-unit-win-nothing-0" C:/Juju/lib/juju/tools/unit-win-nothing-0/ju
jud.exe unit --data-dir C:/Juju/lib/juju --unit-name win-nothing/0 --debug --log
-file C:/Juju/log/unit-win-nothing-0.log
LOAD_ORDER_GROUP :
TAG : 0
2014-05-04 13:25:58.515 1824 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2014-05-04 13:25:59.030 1824 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.metadata.services.maasservice.MaaSHttpService' load_class C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2014-05-04 13:25:59.171 1824 DEBUG cloudbaseinit.metadata.services.maasservice [-] Getting metadata from: http://192.168.80.142:5240/metadata/2012-03-01/meta-data/ _get_data C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\metadata\services\maasservice.py:100
2014-05-04 13:25:59.219 1824 INFO cloudbaseinit.init [-] Metadata service loaded: 'MaaSHttpService'
2014-05-04 13:25:59.219 1824 DEBUG cloudbaseinit.metadata.services.ma
@ader1990
ader1990 / soliditycontractmad
Created April 13, 2018 18:48
solidity contract
pragma solidity ^0.4.20;
/*
* Team JUST presents..
* ====================================*
* _____ _ _ _ _____ ___ ____ *
*| _ |___| | | | | | |_ | \ *
*| __| . | | | | | |_ | | | *
*|__| |___|_____|__|__| |___|____/ *
* *
# I have run the following and got the attachement data for block01 of webdollar blockchain
# >> blockchainDB.allDocs({include_docs: true, limit: 200, attachments: true}, function(err, doc) {row = doc.rows[199].doc._attachments.key.data})
# var data looks like this:
# >> 'MDAwMDdlMzAxMzcxMWJjMTI2YTg3MDhhMzI0NDcyZmRmY2Y2ODU1Y2VmMWY5NzliMGRmNDM0NzVjOTU2OGUzMzAwMDBlNzI0MDAwMTczMWQ0NmMxMzFlYjZkZDQ2NjdhOTZiZGMyN2JhZjkyMjNiZWM3MmMzNDY4ZGZiNmJhNTJjNDYwZTc2NDIzYTQwMDAwMDQ0NzZjMWQzNTViMDMyMDU0MTIyMDQ4MDRlNDI3ZjlhNTZkZTE1ZjEwZjBjODBmYzUzMGZlY2RlOW
# E0OGFlNmFlZGU4NjFlOTkwM2U1NDIyZjdjMTExMzU4MDMyZGZlNmNhMzdhYWQ4YmRkNWRmNmUwZTI3NjEzNTlkMzBhODI3NTA1OGUyOTlmY2MwMzgxNTM0NTQ1ZjU1Y2Y0M2U0MTk4M2Y1ZDRjOTQ1NjAwMDAwMDAwMGExY2ZjZWIyMTVhZWFjNDZjMGI3ZWVhMGQ1ZGE5ZGVmZDkyN2UyNDUwNGI3NTdlNmMzZDM3MDI4NTNjOWM5OTAxMDAwMDAxNzMxZDQ2YzEzM
# WViNmRkNDY2N2E5NmJkYzI3YmFmOTIyM2JlYzcyYzM0NjhkZmI2YmE1MmM0NjBlNzY0MjNhNA=='
# I would like now to deserialize it using the minimum non cluttered code and obtain the timestamp, for example
# Got the cod
@ader1990
ader1990 / gist:89c70957182cf7f4055179a746202ffb
Last active August 2, 2021 10:12
Install webdollar on android
# How to install and run WebDollar on Android Linux console
# Requires Android 9
# Install termux from
# https://play.google.com/store/apps/details?id=com.termux&hl=en_US
# Install AnLinux
# https://play.google.com/store/apps/details?id=exa.lnx.a
# Follow the instructions from AnLinux for Ubuntu installation from AnLinux
Main focus: insert in a database the information about NASDAQ listed companies.
Steps:
1. Create a program that downloads a file from the internet with the companies info: ftp://ftp.nasdaqtrader.com/symboldirectory/nasdaqlisted.txt
2. Create a program that reads line by line the file
3. Create a program that parses each line (split by the separator |)
4. Create a database table with the required fields
5. Insert the companies into the DB
name, lat, lng, website, city, county
SPITALUL CLINIC JUDETEAN DE URGENTA "PIUS BRANZEU" TIMISOARA, 45.737248, 21.241815, https://www.hosptm.ro/, Timisoara, Timis
SPITALUL CLINIC MUNICIPAL DE URGENTA TIMISOARA, 45.759540, 21.226821, https://www.spitalul-municipal-timisoara.ro/, Timisoara, Timis
SPITALUL CLINIC DE URGENTA PENTRU COPII "LOUIS TURCANU"- TIMISOARA, 45.753634, 21.221993, https://www.spital-copii-timisoara.info/, Timisoara, Timis
SPITALUL CLINIC DE BOLI INFECTIOASE SI PNEUMOFTIZIOLOGIE "Dr. Victor BABES" TIMISOARA, 45.768692, 21.259651, https://www.spitalul-vbabes-tm.ro/, Timisoara, Timis
INSTITUTUL DE BOLI CARDIO-VASCULARE - TIMISOARA, 45.769319, 21.259225, http://www.cardiologie.ro/, Timisoara, Timis
Spitalul Clinic Militar de Urgenta "DR. Victor Popescu" - Timisoara, 45.757203, 21.225397, http://www.smutm.ro/, Timisoara, Timis
SPITALUL GENERAL CAI FERATE TIMISOARA, 45.749567, 21.218514, https://www.spitalcftm.ro/, Timisoara, Timis