├── CNAME ├── robots.txt ├── Makefile ├── _category ├── ai.md ├── tips.md ├── tools.md ├── research.md ├── tutorials.md └── webservice.md ├── favicon.ico ├── images ├── me.jpg ├── b94_logo.png ├── alexa-skill.jpg ├── note-students.png ├── Page-3-Image-1.png ├── Page-12-Image-15.png └── webservice-folder-structure-golang.png ├── _sass ├── _measure.scss ├── _positions.scss ├── _clearfix.scss ├── _gists.scss ├── basscss │ ├── _base-reset.scss │ ├── _color-base.scss │ ├── _utility-typography.scss │ ├── _utility-headings.scss │ ├── _buttons-blue.scss │ ├── _base-buttons.scss │ ├── _base-forms.scss │ ├── _colors.scss │ ├── _base-typography.scss │ ├── _syntax-highlighting.scss │ └── _utility-white-space.scss ├── _base.scss ├── _blockquotes.scss ├── _typography.scss ├── _basscss.scss ├── _social-icons.scss ├── _footer.scss ├── _tables.scss ├── _media-queries.scss ├── _pagination.scss ├── _posts.scss ├── _links.scss ├── _animations.scss ├── _code.scss ├── _header.scss ├── _forms.scss └── _variables.scss ├── favicon-16x16.png ├── favicon-32x32.png ├── mstile-150x150.png ├── apple-touch-icon.png ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── thanks.md ├── .gitignore ├── Gemfile ├── _layouts ├── page.html ├── center.html ├── category.html ├── default.html └── post.html ├── browserconfig.xml ├── 404.md ├── _includes ├── post_footer.html ├── header.html ├── navigation.html ├── pagination.html ├── footer.html ├── ajaxify_content_form.html ├── social_links.html ├── share_buttons.html └── head.html ├── .forestry ├── settings.yml └── front_matter │ └── templates │ └── posts.yml ├── site.webmanifest ├── search.json ├── css └── pixyll.scss ├── index.html ├── feed.xml ├── LICENSE.txt ├── fb-instant-articles.xml ├── _posts ├── 2018-06-10-chatbots-a-different-approach-for-messaging.md ├── 2018-02-17-notes-students.md ├── 2018-04-05-OWASP.md ├── 2018-08-06-mail-server-localhost.md ├── 2018-06-10-automatic-gearbox-module-fuzzy-controller.md ├── 2018-08-08-bootable-windows-usb-from-mac.md ├── 2018-04-26-setup-apache-host-as-proxy.md ├── 2018-05-23-how-I-started-to-build-a-chatbot.md ├── 2018-04-14-format-usb-to-fat16-or-fat32-mac.md ├── 2018-04-18-RESTful-api-resources.md ├── 2018-09-10-keep-changelog-file.md ├── 2018-02-18-setup-custom-service-ubuntu.md ├── 2018-08-02-postgres-ubuntu-setup.md ├── 2018-07-09-5-questions-build-custom-alexa-skill.md └── 2018-05-28-third-eye-blind-people-arduino.md ├── Rakefile ├── contact.html ├── about.md ├── _config.yml ├── README.md ├── _drafts └── webservice-folder-structure.md └── safari-pinned-tab.svg /CNAME: -------------------------------------------------------------------------------- 1 | www.boobo94.xyz -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | run: 4 | sudo jekyll serve --watch -------------------------------------------------------------------------------- /_category/ai.md: -------------------------------------------------------------------------------- 1 | --- 2 | category: ai 3 | permalink: "/ai" 4 | --- -------------------------------------------------------------------------------- /_category/tips.md: -------------------------------------------------------------------------------- 1 | --- 2 | category: tips 3 | permalink: "/tips" 4 | --- -------------------------------------------------------------------------------- /_category/tools.md: -------------------------------------------------------------------------------- 1 | --- 2 | category: tools 3 | permalink: "/tools" 4 | --- -------------------------------------------------------------------------------- /_category/research.md: -------------------------------------------------------------------------------- 1 | --- 2 | category: research 3 | permalink: "/research" 4 | --- -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/favicon.ico -------------------------------------------------------------------------------- /_category/tutorials.md: -------------------------------------------------------------------------------- 1 | --- 2 | category: tutorials 3 | permalink: "/tutorials" 4 | --- -------------------------------------------------------------------------------- /_category/webservice.md: -------------------------------------------------------------------------------- 1 | --- 2 | category: webservice 3 | permalink: "/webservice" 4 | --- -------------------------------------------------------------------------------- /images/me.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/images/me.jpg -------------------------------------------------------------------------------- /_sass/_measure.scss: -------------------------------------------------------------------------------- 1 | .measure { 2 | margin: 0 auto; 3 | max-width: $measure-width; 4 | } 5 | -------------------------------------------------------------------------------- /favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/favicon-16x16.png -------------------------------------------------------------------------------- /favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/favicon-32x32.png -------------------------------------------------------------------------------- /images/b94_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/images/b94_logo.png -------------------------------------------------------------------------------- /mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/mstile-150x150.png -------------------------------------------------------------------------------- /_sass/_positions.scss: -------------------------------------------------------------------------------- 1 | .left { 2 | float: left; 3 | } 4 | 5 | .right { 6 | float: right; 7 | } 8 | -------------------------------------------------------------------------------- /apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/apple-touch-icon.png -------------------------------------------------------------------------------- /images/alexa-skill.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/images/alexa-skill.jpg -------------------------------------------------------------------------------- /images/note-students.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/images/note-students.png -------------------------------------------------------------------------------- /android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/android-chrome-192x192.png -------------------------------------------------------------------------------- /android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/android-chrome-512x512.png -------------------------------------------------------------------------------- /images/Page-3-Image-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/images/Page-3-Image-1.png -------------------------------------------------------------------------------- /images/Page-12-Image-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/images/Page-12-Image-15.png -------------------------------------------------------------------------------- /thanks.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Thanks For Your Message 4 | permalink: /thanks/ 5 | --- 6 | {{ site.text.thanks }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Thumbs.db 3 | db.json 4 | *.log 5 | node_modules/ 6 | public/ 7 | .deploy*/ 8 | _site 9 | .sass-cache/ 10 | Gemfile.lock -------------------------------------------------------------------------------- /images/webservice-folder-structure-golang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xzya/boobo94.github.io/master/images/webservice-folder-structure-golang.png -------------------------------------------------------------------------------- /_sass/_clearfix.scss: -------------------------------------------------------------------------------- 1 | .clearfix:before, .clearfix:after { 2 | content: ' '; 3 | display: table; 4 | } 5 | 6 | .clearfix:after { 7 | clear: both; 8 | } 9 | -------------------------------------------------------------------------------- /_sass/_gists.scss: -------------------------------------------------------------------------------- 1 | .gist, 2 | .gist .highlight .p { 3 | font-size: .75rem; 4 | } 5 | 6 | .gist .lines { 7 | width: 100%; 8 | } 9 | 10 | .gist table>tbody>tr>td { 11 | border-top: 0px; 12 | } 13 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # A simple Ruby Gem to bootstrap dependencies for setting up and 4 | # maintaining a local Jekyll environment in sync with GitHub Pages 5 | # https://github.com/github/pages-gem 6 | gem 'github-pages' 7 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 |
6 |

{{ page.title }}

7 |
8 |
9 | {{ content }} 10 |
11 |
12 | -------------------------------------------------------------------------------- /_sass/basscss/_base-reset.scss: -------------------------------------------------------------------------------- 1 | body, 2 | button { 3 | margin: 0; 4 | } 5 | 6 | button, 7 | input, 8 | select, 9 | textarea { 10 | font-family: inherit; 11 | font-size: 100%; 12 | } 13 | 14 | img { 15 | max-width: 100%; 16 | } 17 | 18 | svg { 19 | max-height: 100%; 20 | } 21 | -------------------------------------------------------------------------------- /browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffffff 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /404.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: center 3 | permalink: /404.html 4 | --- 5 | 6 | # 404 7 | 8 | Sorry, we can't seem to find this page's boobo94. 9 | 10 |
11 | Home 12 | Contact 13 |
14 | -------------------------------------------------------------------------------- /_sass/_base.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | html, body { 4 | height: auto; 5 | min-height: 100%; 6 | } 7 | 8 | img { 9 | max-width: 100%; 10 | } 11 | 12 | em img { 13 | max-width: 100%; 14 | margin-left: 0; 15 | } 16 | 17 | body { 18 | box-sizing: border-box; 19 | -moz-box-sizing: border-box; 20 | -webkit-box-sizing: border-box; 21 | } 22 | -------------------------------------------------------------------------------- /_sass/_blockquotes.scss: -------------------------------------------------------------------------------- 1 | blockquote { 2 | border-left: 5px solid #7a7a7a; 3 | font-style: italic; 4 | margin-left: $space-1; 5 | padding: $space-1; 6 | } 7 | 8 | blockquote footer { 9 | background-color: #fff; 10 | border-color: transparent; 11 | color: #7a7a7a; 12 | font-size: .85rem; 13 | font-style: normal; 14 | text-align: left; 15 | padding: 0; 16 | } 17 | -------------------------------------------------------------------------------- /_sass/_typography.scss: -------------------------------------------------------------------------------- 1 | html { 2 | font-size: $base-font-size; 3 | } 4 | 5 | abbr { 6 | border-bottom: $abbr-border-bottom; 7 | cursor: help; 8 | } 9 | 10 | p { 11 | color: #333; 12 | line-height: 1.5; 13 | } 14 | 15 | small, 16 | .small { 17 | font-size: 0.707rem; 18 | } 19 | 20 | sup { 21 | position: relative; 22 | vertical-align: middle; 23 | top: -0.9ex; 24 | } 25 | -------------------------------------------------------------------------------- /_sass/_basscss.scss: -------------------------------------------------------------------------------- 1 | @import 'basscss/base-buttons'; 2 | @import 'basscss/base-forms'; 3 | @import 'basscss/base-reset'; 4 | @import 'basscss/base-typography'; 5 | 6 | @import 'basscss/buttons-blue'; 7 | 8 | @import 'basscss/syntax-highlighting'; 9 | @import 'basscss/color-base'; 10 | @import 'basscss/colors'; 11 | 12 | @import 'basscss/utility-headings'; 13 | @import 'basscss/utility-typography'; 14 | @import 'basscss/utility-white-space'; 15 | -------------------------------------------------------------------------------- /_includes/post_footer.html: -------------------------------------------------------------------------------- 1 |
2 | John Otander 3 |

4 | Pixyll is an open-source Jekyll theme that's built by John Otander. 5 | When he's not writing code and building things, he likes to ski. A. Lot. 6 |

7 |

8 | Follow him on Twitter. 9 |

10 |
11 | -------------------------------------------------------------------------------- /_includes/header.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /_sass/_social-icons.scss: -------------------------------------------------------------------------------- 1 | .social-icons-left, .social-icons-right { 2 | text-align: center; 3 | float: none; 4 | } 5 | 6 | .social-icons { 7 | font-size: 1.25rem; 8 | padding: 0.5em 0 0 0; 9 | width: 100%; 10 | } 11 | 12 | .social-icons a.fa { 13 | cursor: pointer; 14 | opacity: 0.8; 15 | padding: 0.2em; 16 | } 17 | 18 | .social-icons a.fa:hover { 19 | opacity: 1; 20 | } 21 | 22 | .social-icons iframe[title=Flattr] { 23 | position: relative; 24 | top: 0.1em; 25 | } 26 | -------------------------------------------------------------------------------- /.forestry/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | new_page_extension: md 3 | auto_deploy: false 4 | admin_path: '' 5 | webhook_url: 6 | sections: 7 | - type: directory 8 | path: _category 9 | label: Category 10 | create: all 11 | match: "**/*" 12 | - type: jekyll-pages 13 | label: Pages 14 | create: all 15 | - type: jekyll-posts 16 | label: Posts 17 | create: all 18 | upload_dir: images 19 | public_path: "/images" 20 | front_matter_path: '' 21 | use_front_matter_path: false 22 | file_template: ":filename:" 23 | -------------------------------------------------------------------------------- /site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /_sass/basscss/_color-base.scss: -------------------------------------------------------------------------------- 1 | /* Basscss Color Base */ 2 | 3 | body { 4 | color: $dark-gray; 5 | background-color: white; 6 | } 7 | 8 | a { 9 | color: $blue; 10 | text-decoration: none; 11 | } 12 | 13 | a:hover { 14 | text-decoration: underline; 15 | } 16 | 17 | pre, 18 | code { 19 | background-color: $lighter-gray; 20 | border-radius: $border-radius; 21 | } 22 | 23 | hr { 24 | border: 0; 25 | border-bottom-style: solid; 26 | border-bottom-width: $border-width; 27 | border-bottom-color: $border-color; 28 | } 29 | -------------------------------------------------------------------------------- /_includes/navigation.html: -------------------------------------------------------------------------------- 1 | {% assign default_paths = site.pages | map: "path" %} 2 | {% assign page_paths = site.header_pages | default: default_paths %} 3 | 4 | 5 | 6 | {% for path in page_paths %} 7 | 8 | {% assign page = site.pages | where: "path", path | first %} 9 | 10 | {% if page.title %} 11 | {{ page.title }} 12 | {% endif %} 13 | 14 | 15 | {% endfor %} -------------------------------------------------------------------------------- /search.json: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | [ 5 | {% for post in site.posts %} 6 | { 7 | "title" : "{{ post.title | escape }}", 8 | "summary" : "{% if post.summary %} {{ post.summary }} {% else %} {{ post.excerpt }} {% endif %}", 9 | "category" : "{{ post.category }}", 10 | "tags" : "{{ post.tags | join: ', ' }}", 11 | "url" : "{{ post.url | prepend: site.baseurl }}", 12 | "date" : "{{ post.date | date: site.date_format }}" 13 | } {% unless forloop.last %},{% endunless %} 14 | {% endfor %} 15 | ] 16 | -------------------------------------------------------------------------------- /_sass/basscss/_utility-typography.scss: -------------------------------------------------------------------------------- 1 | /* Basscss Utility Typography */ 2 | 3 | .bold { 4 | font-weight: $bold-font-weight; 5 | } 6 | 7 | .regular { 8 | font-weight: normal; 9 | } 10 | 11 | .italic { 12 | font-style: italic; 13 | } 14 | 15 | .caps { 16 | text-transform: uppercase; 17 | letter-spacing: .2em; 18 | } 19 | 20 | .left-align { 21 | text-align: left; 22 | } 23 | 24 | .center { 25 | text-align: center; 26 | } 27 | 28 | .right-align { 29 | text-align: right; 30 | } 31 | 32 | .justify { 33 | text-align: justify; 34 | } 35 | 36 | .nowrap { 37 | white-space: nowrap; 38 | } 39 | -------------------------------------------------------------------------------- /css/pixyll.scss: -------------------------------------------------------------------------------- 1 | --- 2 | # The scss file which include files from _sass/ 3 | --- 4 | @charset "UTF-8"; 5 | 6 | @import 'variables'; 7 | 8 | @import 'basscss'; 9 | 10 | @import 'base'; 11 | 12 | @import 'links'; 13 | @import 'positions'; 14 | @import 'clearfix'; 15 | @import 'code'; 16 | @import 'forms'; 17 | @import 'typography'; 18 | @import 'header'; 19 | @import 'tables'; 20 | @import 'animations'; 21 | @import 'footer'; 22 | @import 'social-icons'; 23 | @import 'blockquotes'; 24 | @import 'posts'; 25 | @import 'media-queries'; 26 | @import 'gists'; 27 | @import 'measure'; 28 | @import 'pagination'; 29 | -------------------------------------------------------------------------------- /_sass/basscss/_utility-headings.scss: -------------------------------------------------------------------------------- 1 | /* Basscss Utility Headings */ 2 | 3 | .h00 { 4 | font-size: $h00; 5 | } 6 | 7 | .h0 { 8 | font-size: $h0; 9 | } 10 | 11 | @media #{$breakpoint-md} { 12 | .h00-responsive { 13 | font-size: $h00-responsive; 14 | } 15 | 16 | .h0-responsive { 17 | font-size: $h0-responsive; 18 | } 19 | 20 | .h1-responsive { 21 | font-size: $h1-responsive; 22 | } 23 | } 24 | 25 | @media #{$breakpoint-xl} { 26 | .h00-responsive { 27 | font-size: $h00-responsive-max; 28 | } 29 | 30 | .h0-responsive { 31 | font-size: $h0-responsive-max; 32 | } 33 | 34 | .h1-responsive { 35 | font-size: $h1-responsive-max; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /_layouts/center.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | {% if site.google_tag_manager %} 6 | 8 | {% endif %} 9 |
10 | {% include header.html %} 11 | 12 |
13 |
14 | {{ content }} 15 |
16 |
17 |
18 | 19 | {% include footer.html %} 20 | 21 | 22 | -------------------------------------------------------------------------------- /_sass/basscss/_buttons-blue.scss: -------------------------------------------------------------------------------- 1 | .button-blue { 2 | color: white; 3 | background-color: $blue; 4 | border-radius: $border-radius; 5 | transition-duration: .1s; 6 | transition-timing-function: ease-out; 7 | transition-property: box-shadow, background-color; 8 | } 9 | 10 | .button-blue:hover { 11 | opacity: .875; 12 | } 13 | 14 | .button-blue:active, 15 | .button-blue.is-active { 16 | box-shadow: inset 0 0 0 32px rgba(#000,.125), inset 0 2px 3px 0 rgba(#000,.25); 17 | } 18 | 19 | .button-blue:focus { 20 | outline: none; 21 | box-shadow: 0 0 0 2px rgba(white, .5), 0 0 1px 4px rgba($blue, .5); 22 | } 23 | 24 | .button-blue:disabled, 25 | .button-blue.is-disabled { 26 | opacity: .5; 27 | } 28 | -------------------------------------------------------------------------------- /_sass/basscss/_base-buttons.scss: -------------------------------------------------------------------------------- 1 | /* Basscss Base Buttons */ 2 | 3 | button, 4 | .button { 5 | font-family: $button-font-family; 6 | font-size: $button-font-size; 7 | font-weight: $button-font-weight; 8 | text-decoration: none; 9 | cursor: pointer; 10 | display: inline-block; 11 | box-sizing: border-box; 12 | line-height: $button-line-height; 13 | padding: $button-padding-y $button-padding-x; 14 | margin: 0; 15 | height: auto; 16 | border: 1px solid transparent; 17 | vertical-align: middle; 18 | -webkit-appearance: none; 19 | } 20 | 21 | ::-moz-focus-inner { 22 | border: 0; 23 | padding: 0; 24 | } 25 | 26 | .button:hover { 27 | text-decoration: none; 28 | border: 1px solid transparent; 29 | } 30 | -------------------------------------------------------------------------------- /_layouts/category.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 | 8 | {% for post in site.categories[page.category] %} 9 |
10 | 11 | 12 |

{{ post.title }}

13 |
14 | 15 | {% if post.summary %} {{ post.summary }} {% else %} {{ post.excerpt }} {% endif %} 16 | 17 |
18 | {% endfor %} 19 |
20 | 21 |
-------------------------------------------------------------------------------- /_sass/_footer.scss: -------------------------------------------------------------------------------- 1 | .site { 2 | display: -webkit-box; 3 | display: -webkit-flex; 4 | display: -ms-flexbox; 5 | display: flex; 6 | -webkit-box-orient: vertical; 7 | -webkit-box-direction: normal; 8 | -webkit-flex-direction: column; 9 | -ms-flex-direction: column; 10 | flex-direction: column; 11 | min-height: 100vh; 12 | } 13 | 14 | .site-wrap { 15 | -webkit-box-flex: 1; 16 | -webkit-flex: 1; 17 | -ms-flex: 1 0 auto; 18 | flex: 1 0 auto; 19 | } 20 | 21 | footer { 22 | background-color: $footer-bg-color; 23 | border-top: $footer-border-top; 24 | color: $footer-color; 25 | font-size: $footer-font-size; 26 | font-weight: $footer-font-weight; 27 | padding: $footer-padding; 28 | text-align: center; 29 | } 30 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | {% assign posts_count = paginator.posts | size %} 5 | 6 |
7 | {% if posts_count > 0 %} 8 |
9 | 10 | {% for post in paginator.posts %} 11 |
12 | 13 |

{{ post.title }}

14 | 15 | {% if post.summary %} 16 | {{ post.summary }} 17 | {% else %} 18 | {{ post.excerpt }} 19 | {% endif %} 20 | 21 |
22 | {% endfor %} 23 |
24 | 25 | {% include pagination.html %} 26 | {% else %} 27 |

{{ site.text.index.coming_soon }}

28 | {% endif %} 29 |
30 | -------------------------------------------------------------------------------- /feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | 5 | 6 | 7 | {{ site.title | xml_escape }} 8 | {{ site.description | xml_escape }} 9 | {{ site.url }}{{ site.baseurl }}/ 10 | 11 | {% for post in site.posts limit:10 %} 12 | 13 | {{ post.title | xml_escape }} 14 | {{ post.content | xml_escape }} 15 | {{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }} 16 | {{ post.url | prepend: site.baseurl | prepend: site.url }} 17 | {{ post.url | prepend: site.baseurl | prepend: site.url }} 18 | 19 | {% endfor %} 20 | 21 | 22 | -------------------------------------------------------------------------------- /.forestry/front_matter/templates/posts.yml: -------------------------------------------------------------------------------- 1 | --- 2 | label: Posts 3 | hide_body: false 4 | is_partial: false 5 | fields: 6 | - type: text 7 | default: post 8 | label: Layout 9 | name: layout 10 | hidden: true 11 | - type: textarea 12 | name: summary 13 | label: Summary 14 | description: Meta description 15 | config: 16 | required: true 17 | - type: select 18 | config: 19 | source: 20 | type: simple 21 | options: 22 | - tutorials 23 | - research 24 | - tools 25 | - ai 26 | - webservice 27 | - tips 28 | required: true 29 | label: Category 30 | name: categories 31 | default: tutorials 32 | - type: text 33 | name: keywords 34 | label: Keywords 35 | - type: tag_list 36 | name: tags 37 | label: Tags 38 | - type: list 39 | label: Redirect From 40 | name: redirect_from 41 | pages: 42 | - _posts/webservice-folder-structure.md 43 | - _posts/2018-09-10-keep-changelog-file.md 44 | - _posts/2018-06-10-chatbots-a-different-approach-for-messaging.md 45 | -------------------------------------------------------------------------------- /_sass/_tables.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Table styles copied from Bootstrap 3 | Copyright (c) 2013 Twitter, Inc 4 | */ 5 | 6 | table { 7 | width: 100%; 8 | max-width: 100%; 9 | margin-bottom: 1.5rem; 10 | font-size: 1.125rem; 11 | // Cells 12 | > thead, 13 | > tbody, 14 | > tfoot { 15 | > tr { 16 | > th, 17 | > td { 18 | padding: 12px; 19 | line-height: 1.2; 20 | vertical-align: top; 21 | border-top: 1px solid #333; 22 | } 23 | } 24 | } 25 | // Bottom align for column headings 26 | > thead > tr > th { 27 | vertical-align: bottom; 28 | border-bottom: 2px solid #333; 29 | } 30 | // Remove top border from thead by default 31 | > caption + thead, 32 | > colgroup + thead, 33 | > thead:first-child { 34 | > tr:first-child { 35 | > th, 36 | > td { 37 | border-top: 0; 38 | } 39 | } 40 | } 41 | // Account for multiple tbody instances 42 | > tbody + tbody { 43 | border-top: 2px solid #333; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /_includes/pagination.html: -------------------------------------------------------------------------------- 1 | {% if paginator.total_pages != 1 %} 2 | 23 | {% endif %} 24 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | 8 | {% if site.enable_anchorjs %} 9 | 10 | {% endif %} 14 | 15 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2015 John Otander 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | {% if site.google_tag_manager %} 6 | 8 | {% endif %} 9 | {% if site.facebook_comments %} 10 |
11 | 18 | {% endif %} 19 | 20 |
21 | {% include header.html %} 22 | 23 |
24 |
25 | {{ content }} 26 |
27 |
28 |
29 | 30 | {% include footer.html %} 31 | 32 | 33 | -------------------------------------------------------------------------------- /_includes/ajaxify_content_form.html: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /_sass/_media-queries.scss: -------------------------------------------------------------------------------- 1 | @media screen and (min-width: $viewport-small) { 2 | html { 3 | font-size: 16px; 4 | } 5 | 6 | h1, 7 | .h1 { 8 | font-size: $h1; 9 | } 10 | 11 | .site-header { 12 | text-align: left; 13 | } 14 | 15 | .site-nav { 16 | margin-top: 0; 17 | } 18 | 19 | .site-header a { 20 | font-size: $h4; 21 | } 22 | 23 | .site-header .site-title { 24 | font-size: $h3; 25 | float: left; 26 | } 27 | 28 | .site-header .site-nav { 29 | float: right; 30 | margin-top: .25rem; 31 | } 32 | 33 | blockquote { 34 | margin-left: $space-3; 35 | padding: $space-3; 36 | } 37 | 38 | .social-icons-left { 39 | text-align: left; 40 | } 41 | 42 | .social-icons-right { 43 | text-align: right; 44 | } 45 | } 46 | 47 | @media screen and (min-width: $viewport-medium) { 48 | html { 49 | font-size: 18px; 50 | } 51 | } 52 | 53 | @media screen and (min-width: $viewport-large) { 54 | html { 55 | font-size: 20px; 56 | } 57 | } 58 | 59 | @media screen and (min-width: $viewport-large + 14) { 60 | em img { 61 | max-width: $measure-width + 14; 62 | margin-left: -7em; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /_sass/_pagination.scss: -------------------------------------------------------------------------------- 1 | .pagination { 2 | font-size: 1rem; 3 | font-family: 'Lato', 'Helvetica Neue', Helvetica, sans-serif; 4 | font-weight: 300; 5 | text-align: center; 6 | } 7 | 8 | .pagination a, .pagination .disabled { 9 | -webkit-transition: all 0.2s ease-in-out; 10 | -moz-transition: all 0.2s ease-in-out; 11 | transition: all 0.2s ease-in-out; 12 | background: #fafafa; 13 | border-radius: 0.1875em; 14 | border: 1px solid #f3f3f3; 15 | color: #333333; 16 | padding: 1em 1.5em; 17 | } 18 | 19 | .pagination .disabled, .pagination .pagination-meta { 20 | opacity: 0.5; 21 | } 22 | 23 | .pagination .pagination-meta { 24 | overflow: hidden; 25 | } 26 | 27 | .pagination a:hover, .pagination a:focus { 28 | background: white; 29 | color: #477dca; 30 | } 31 | 32 | .pagination a:active { 33 | background: #f7f7f7; 34 | } 35 | 36 | .pagination .button { 37 | font-size: 1rem; 38 | font-weight: 300; 39 | letter-spacing: 1px; 40 | } 41 | 42 | .button-disabled { 43 | opacity: 0.55; 44 | background-color: #999; 45 | } 46 | 47 | .button-disabled:hover, 48 | .button-disabled:active, 49 | .button-disabled:focus { 50 | cursor: not-allowed; 51 | background-color: #999; 52 | } 53 | -------------------------------------------------------------------------------- /_sass/_posts.scss: -------------------------------------------------------------------------------- 1 | .posts { 2 | margin: 0; 3 | } 4 | 5 | .posts .post { 6 | margin-bottom: 0.75em; 7 | border-bottom: thin solid #f3f3f3; 8 | } 9 | 10 | .posts .post:last-child { 11 | border-bottom: none; 12 | margin-bottom: .375em; 13 | padding-bottom: 0; 14 | } 15 | 16 | .post-link .post-title { 17 | margin-top: 0; 18 | font-weight: 600; 19 | color: #333; 20 | } 21 | 22 | .post-footer { 23 | @extend .italic; 24 | margin-top: .75rem; 25 | text-align: center; 26 | } 27 | 28 | .post-footer .avatar { 29 | margin: 2rem 0; 30 | width: 100px; 31 | border-radius: 50%; 32 | } 33 | 34 | .meta, 35 | .post-meta { 36 | width: auto; 37 | font-weight: 300; 38 | margin: 0; 39 | padding: .25em 0; 40 | color: #7a7a7a; 41 | font-style: italic; 42 | } 43 | 44 | .related-post-title { 45 | border-bottom: thin solid #f3f3f3; 46 | } 47 | 48 | .post-content { 49 | iframe { 50 | margin: 0 auto; 51 | display: block; 52 | width: 70%; 53 | height: 350px; 54 | } 55 | 56 | @media screen and (max-width: $viewport-small) { 57 | iframe { 58 | width: 100%; 59 | height: 200px; 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /_sass/_links.scss: -------------------------------------------------------------------------------- 1 | a { 2 | color: $link-color; 3 | background-image: linear-gradient(to top, 4 | rgba(0,0,0,0) 13%, 5 | rgba($link-color,.8) 13%, 6 | rgba($link-color,.8) 18%, 7 | rgba(0,0,0,0) 17% 8 | ); 9 | text-shadow: white 1px 0px 0px, white -1px 0px 0px; 10 | } 11 | 12 | a:hover, 13 | a:focus, 14 | a:active { 15 | border: 0; 16 | color: $link-hover-color; 17 | text-decoration: none; 18 | background-image: linear-gradient(to top, 19 | rgba(0,0,0,0) 13%, 20 | rgba($link-hover-color,.8) 13%, 21 | rgba($link-hover-color,.8) 17%, 22 | rgba(0,0,0,0) 17% 23 | ); 24 | text-shadow: white 1px 0px 0px, white -1px 0px 0px; 25 | } 26 | 27 | // Correct issues with buttons 28 | button, 29 | .button { 30 | text-shadow: none; 31 | background-image: none; 32 | } 33 | 34 | .button:hover, 35 | .button:focus, 36 | .button:active { 37 | color: white; 38 | text-shadow: none; 39 | background-image: none; 40 | } 41 | 42 | .anchorjs-link { 43 | text-shadow: none; 44 | background-image: none; 45 | } 46 | .anchorjs-link:hover, 47 | .anchorjs-link:focus, 48 | .anchorjs-link:active{ 49 | border: 0; 50 | color: $link-hover-color; 51 | text-shadow: none; 52 | background-image: none; 53 | } 54 | -------------------------------------------------------------------------------- /_sass/basscss/_base-forms.scss: -------------------------------------------------------------------------------- 1 | /* Basscss Base Forms */ 2 | 3 | input, 4 | select, 5 | textarea, 6 | fieldset { 7 | font-size: $form-field-font-size; 8 | margin-top: 0; 9 | margin-bottom: $space-1; 10 | } 11 | 12 | input[type=text], 13 | input[type=datetime], 14 | input[type=datetime-local], 15 | input[type=email], 16 | input[type=month], 17 | input[type=number], 18 | input[type=password], 19 | input[type=search], 20 | input[type=tel], 21 | input[type=time], 22 | input[type=url], 23 | input[type=week] { 24 | box-sizing: border-box; 25 | height: $form-field-height; 26 | padding: $form-field-padding-y $form-field-padding-x; 27 | vertical-align: middle; 28 | -webkit-appearance: none; 29 | } 30 | 31 | select { 32 | box-sizing: border-box; 33 | line-height: 1.75; 34 | padding: $form-field-padding-y $form-field-padding-x; 35 | } 36 | 37 | select:not([multiple]) { 38 | height: $form-field-height; 39 | vertical-align: middle; 40 | } 41 | 42 | textarea { 43 | box-sizing: border-box; 44 | line-height: 1.75; 45 | padding: $form-field-padding-y $form-field-padding-x; 46 | } 47 | 48 | .fieldset-reset { 49 | padding: 0; 50 | margin-left: 0; 51 | margin-right: 0; 52 | border: 0; 53 | } 54 | 55 | .fieldset-reset legend { 56 | padding: 0; 57 | } 58 | -------------------------------------------------------------------------------- /fb-instant-articles.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | 5 | 6 | 7 | 8 | {{ site.name | xml_escape }} 9 | {{ site.url }} 10 | 11 | {% if site.description %}{{ site.description | xml_escape }}{% endif %} 12 | 13 | {% for post in site.posts %} 14 | {% unless post.link %} 15 | 16 | {{ post.title | xml_escape }} 17 | {{ site.url }}{{ post.url }} 18 | 19 | 22 | 23 | {{ post.url }} 24 | 25 | {% if post.summary %} 26 | {{ post.summary | xml_escape }} 27 | {% endif %} 28 | 29 | {{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }} 30 | {{ site.author }} 31 | 32 | {% endunless %} 33 | {% endfor %} 34 | 35 | 36 | -------------------------------------------------------------------------------- /_posts/2018-06-10-chatbots-a-different-approach-for-messaging.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Chatbots a different approach for messaging 4 | summary: Chatbots a different approach for messaging 5 | date: 2018-06-10 00:00:00 6 | categories: research 7 | redirect_from: /research/2018/06/10/chatbots-a-different-approach-for-messaging/ 8 | --- 9 | 10 | **_Abstract_ - This article shows general informations and different issues of usage about chatbots. Also shows a new way of usage of these in a new domain, throw these can be used to send alerts and notifications to many users.** 11 | 12 | **_Keywords - chatbot, artificial intelligence, business, online services_** 13 | 14 | This article shows issues of a new gambler in industry which will change in short time the technology businesses. As we can see, we live in an age where IT domain it’s changing faster, because every day new technologies are launched, new programming languages, new electronic devices or electronics, smartphones, computers and more and more the phenomenon IOT (internet of things) escalate. But in this story was launched subtle a new idea, chatbot, care in my opinion represents the beginning into a new way, beside of those known by us until now about automatization. 15 | 16 | Intregul articol poate fi citit si descarcat de [aici](http://libgen.io/book/index.php?md5=BC3209388E73C91C735D4C6492A9AD33). -------------------------------------------------------------------------------- /_sass/_animations.scss: -------------------------------------------------------------------------------- 1 | .animated { 2 | -webkit-animation-duration: 1s; 3 | animation-duration: 1s; 4 | -webkit-animation-fill-mode: both; 5 | animation-fill-mode: both; 6 | } 7 | 8 | .animated.infinite { 9 | -webkit-animation-iteration-count: infinite; 10 | animation-iteration-count: infinite; 11 | } 12 | 13 | .animated.hinge { 14 | -webkit-animation-duration: 2s; 15 | animation-duration: 2s; 16 | } 17 | 18 | @-webkit-keyframes fadeInDown { 19 | 0% { 20 | opacity: 0; 21 | -webkit-transform: translateY(-20px); 22 | transform: translateY(-20px); 23 | } 24 | 25 | 100% { 26 | opacity: 1; 27 | -webkit-transform: translateY(0); 28 | transform: translateY(0); 29 | } 30 | } 31 | 32 | @keyframes fadeInDown { 33 | 0% { 34 | opacity: 0; 35 | 36 | -webkit-transform: translateY(-20px) translate3d(0, 0, 0); 37 | -ms-transform: translateY(-20px) translate3d(0, 0, 0); 38 | transform: translateY(-20px) translate3d(0, 0, 0); 39 | } 40 | 41 | 100% { 42 | opacity: 1; 43 | 44 | -webkit-transform: translateY(0) translate3d(0, 0, 0); 45 | -ms-transform: translateY(0) translate3d(0, 0, 0); 46 | transform: translateY(0) translate3d(0, 0, 0); 47 | } 48 | } 49 | 50 | .fade-in-down { 51 | -webkit-animation-name: fadeInDown; 52 | animation-name: fadeInDown; 53 | } 54 | -------------------------------------------------------------------------------- /_posts/2018-02-17-notes-students.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Notes Students" 4 | date: 2018-02-17 12:31:19 5 | summary: "The application aims to complete needs of students from universities by showing them the scolar results and specific information. The system consists in a client application, a web service and a database server which are interconnected." 6 | categories: web 7 | tags: research web open-source 8 | redirect_from: /research/web/open-source/2018/02/17/notes-students/ 9 | --- 10 | 11 | ## Notes Students 12 | 13 | The application aims to complete needs of students from universities by showing them the scolar results and specific information. The system consists in a client application, a web service and a database server which are interconnected. 14 | 15 | ![Notes students image](/images/note-students.png) 16 | 17 | The code is structured as object oriented programming either on client and server side. The client app is written in Angular 2 with Typescript, the server is running on a Node JS and the database is running on PostgreSQL engine. 18 | 19 | Is design specifically for universities, but can be scalable to any types of education system. 20 | 21 | [Click to read Scientific Article](https://docs.google.com/document/d/e/2PACX-1vQnqK2pN3mQEcpvpe7xz0X4wXtII5i2Vf4DSluPjFecul4KdumBFU-V7yVsr8W4loBwRxRIU8dE4uxe/pub){:target="_blank"} or [GitHub Project ](https://github.com/boobo94/notes-student) -------------------------------------------------------------------------------- /_sass/_code.scss: -------------------------------------------------------------------------------- 1 | pre, 2 | pre code { 3 | background-color: transparent; 4 | border-radius: $pre-border-radius; 5 | } 6 | 7 | pre, 8 | code { 9 | font-family: $monospace-font-family; 10 | } 11 | 12 | code { 13 | color: #7a7a7a; 14 | } 15 | 16 | pre { 17 | padding: 1.125em; 18 | line-height: 1.11; 19 | overflow-x: scroll; 20 | margin-bottom: 0.88em; 21 | background-color: $pre-background-color; 22 | } 23 | 24 | .highlight .p { 25 | font-size: 1.125rem; 26 | line-height: 1; 27 | } 28 | 29 | pre { 30 | counter-reset: line-numbering; 31 | white-space: pre; 32 | overflow-x: auto; 33 | word-break: inherit; 34 | word-wrap: inherit; 35 | } 36 | 37 | pre a { 38 | background-image: none; 39 | } 40 | 41 | pre a::before { 42 | content: counter(line-numbering); 43 | counter-increment: line-numbering; 44 | padding-right: 1em; /* space after numbers */ 45 | width: 25px; 46 | text-align: right; 47 | opacity: 0.7; 48 | display: inline-block; 49 | color: $light-gray; 50 | margin-right: 16px; 51 | font-size: 13px; 52 | -webkit-touch-callout: none; 53 | -webkit-user-select: none; 54 | -khtml-user-select: none; 55 | -moz-user-select: none; 56 | -ms-user-select: none; 57 | user-select: none; 58 | } 59 | 60 | pre a:first-of-type::before { 61 | padding-top: 10px; 62 | } 63 | 64 | pre a:last-of-type::before { 65 | padding-bottom: 10px; 66 | } 67 | 68 | pre a:only-of-type::before { 69 | padding: 10px; 70 | } 71 | -------------------------------------------------------------------------------- /_sass/basscss/_colors.scss: -------------------------------------------------------------------------------- 1 | /* Basscss Colors */ 2 | 3 | .dark-gray { 4 | color: $dark-gray; 5 | } 6 | 7 | .white { 8 | color: white; 9 | } 10 | 11 | .blue { 12 | color: $blue; 13 | } 14 | 15 | .mid-gray { 16 | color: $mid-gray; 17 | } 18 | 19 | .light-gray { 20 | color: $light-gray; 21 | } 22 | 23 | .lighter-gray { 24 | color: $lighter-gray; 25 | } 26 | 27 | .red { 28 | color: $red; 29 | } 30 | 31 | .green { 32 | color: $green; 33 | } 34 | 35 | .yellow { 36 | color: $yellow; 37 | } 38 | 39 | .orange { 40 | color: $orange; 41 | } 42 | 43 | .bg-dark-gray { 44 | background-color: $dark-gray; 45 | } 46 | 47 | .bg-white { 48 | background-color: white; 49 | } 50 | 51 | .bg-blue { 52 | background-color: $blue; 53 | } 54 | 55 | .bg-mid-gray { 56 | background-color: $mid-gray; 57 | } 58 | 59 | .bg-light-gray { 60 | background-color: $light-gray; 61 | } 62 | 63 | .bg-lighter-gray { 64 | background-color: $lighter-gray; 65 | } 66 | 67 | .bg-red { 68 | background-color: $red; 69 | } 70 | 71 | .bg-green { 72 | background-color: $green; 73 | } 74 | 75 | .bg-yellow { 76 | background-color: $yellow; 77 | } 78 | 79 | .bg-orange { 80 | background-color: $orange; 81 | } 82 | 83 | .bg-darken-1 { 84 | background-color: $darken-1; 85 | } 86 | 87 | .bg-darken-2 { 88 | background-color: $darken-2; 89 | } 90 | 91 | .bg-darken-3 { 92 | background-color: $darken-3; 93 | } 94 | 95 | .bg-darken-4 { 96 | background-color: $darken-4; 97 | } 98 | -------------------------------------------------------------------------------- /_posts/2018-04-05-OWASP.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "OWASP - Open Web Application Security Project" 4 | date: 2018-04-05 12:31:19 5 | summary: "OWASP - Open Web Application Security Project" 6 | categories: webservice 7 | tags: tips webservice 8 | redirect_from: /tips/webservice/2018/04/05/OWASP/ 9 | --- 10 | 11 | # What is OWASP - Open Web Application Security Project 12 | 13 | 14 | The Secure Coding Practices Quick Reference Guide is a technology agnostic set of general software security coding practices, in a comprehensive checklist format, that can be integrated into the development lifecycle. [[1](#1)] 15 | 16 | The focus is on secure coding requirements, rather then on vulnerabilities and exploits. It includes an introduction to Software Security Principles and a glossary of key terms. [[1](#1)] 17 | 18 | It is designed to serve as a secure coding kick-start tool and easy reference, to help development teams quickly understand secure coding practices. [[1](#1)] 19 | 20 | Quick guide reference can be downloaded from [here](https://www.owasp.org/images/0/08/OWASP_SCP_Quick_Reference_Guide_v2.pdf){:target="_blank"} [[2](#2)] 21 | 22 | As well you can read about this subject in a good covered and well structured repository on GitHub [here](https://github.com/OWASP/DevGuide) 23 | 24 | ### References 25 | 26 | --- 27 | 28 | 1. 29 | 2. 30 | -------------------------------------------------------------------------------- /_posts/2018-08-06-mail-server-localhost.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Simple SMTP server for local development usage" 4 | date: 2018-08-06 22:09:00 5 | summary: Discover how to set up Gmail smtp server or a simple mail server for local development. 6 | categories: tools 7 | redirect_from: /tools/2018/08/07/simple-smtp-server-for-local-development-usage/ 8 | --- 9 | 10 | Today I needed a local smtp server and I tried to connect firstly with my gmail account, but that's not a good idea, because maybe you don't want to commit your credentials and share them with your team. 11 | 12 | ## Use Gmail SMTP Settings 13 | 14 | If you want to use gmail server, with your credentials, here are the credentials: 15 | 16 | ``` 17 | Host: smtp.gmail.com 18 | Username: Your Gmail address (e.g. example@gmail.com) 19 | Password: Your Gmail password 20 | Port (TLS): 587 21 | Port (SSL): 465 22 | TLS/SSL required: true 23 | ``` 24 | 25 | ## Use Local Server 26 | 27 | I installed MailCatcher and I discover that it's very easy to install it and to use it. 28 | 29 | ### About MailCatcher 30 | 31 | MailCatcher runs a simple SMTP server, catch all the messages send to it and display them into a web interface. 32 | 33 | ### How to use it 34 | 35 | `$ gem install mailcatcher` 36 | 37 | `$ mailcatcher` 38 | 39 | Go to http://127.0.0.1:1080/ 40 | Send mail through smtp://127.0.0.1:1025 41 | Use mailcatcher --help to see the command line options. The brave can get the source from the GitHub repository. 42 | 43 | [Github Repository can be found here](https://github.com/sj26/mailcatcher) 44 | 45 | -------------------------------------------------------------------------------- /_sass/_header.scss: -------------------------------------------------------------------------------- 1 | .site-header { 2 | padding-top: $space-1; 3 | padding-bottom: $space-2; 4 | } 5 | 6 | .site-header a { 7 | color: #333; 8 | font-size: $h3; 9 | font-weight: 300; 10 | background-image: none; 11 | } 12 | 13 | .site-header .site-title { 14 | font-size: $h2; 15 | } 16 | 17 | .site-nav { 18 | margin-top: $space-2; 19 | } 20 | 21 | .site-header nav a { 22 | color: #666; 23 | } 24 | 25 | .site-header nav a:hover, 26 | .site-header nav a:focus, 27 | .site-header nav a:active { 28 | color: #444; 29 | opacity: 1; 30 | border-bottom: 2px solid #444; 31 | } 32 | 33 | .site-nav a + a { 34 | margin-left: 1em; 35 | } 36 | 37 | .site-header a:hover, 38 | .posts .post a:hover .post-meta, 39 | .posts .post a:hover .post-title, 40 | .posts .post a:hover .post-summary { 41 | opacity: 0.88; 42 | } 43 | 44 | .site-header { 45 | text-align: center; 46 | } 47 | 48 | .site-header .site-nav { 49 | text-align: center; 50 | } 51 | 52 | #search-label { 53 | color: #666; 54 | margin-right: 1em; 55 | } 56 | 57 | #search-input { 58 | border: none; 59 | font-size: 1rem; 60 | margin: 0; 61 | padding: 0; 62 | width: 0px; 63 | height: auto; 64 | } 65 | 66 | #search-input:focus, 67 | #search-input:hover { 68 | outline: none; 69 | padding-left: 10px; 70 | width: 200px; 71 | -webkit-transition: width .1s; 72 | transition: width .1s; 73 | } 74 | 75 | @media screen and (max-width: $viewport-small) { 76 | #search-input:focus, 77 | #search-input:hover { 78 | width: 80px; 79 | } 80 | } -------------------------------------------------------------------------------- /_sass/basscss/_base-typography.scss: -------------------------------------------------------------------------------- 1 | /* Basscss Base Typography */ 2 | 3 | body { 4 | font-family: $font-family; 5 | line-height: $line-height; 6 | font-size: 100%; 7 | } 8 | 9 | h1, 10 | h2, 11 | h3, 12 | h4, 13 | h5, 14 | h6 { 15 | font-family: $heading-font-family; 16 | font-weight: $heading-font-weight; 17 | line-height: $heading-line-height; 18 | margin-top: 1em; 19 | margin-bottom: .5em; 20 | } 21 | 22 | p, 23 | dl, 24 | ol, 25 | ul { 26 | font-size: $h4; 27 | margin-top: 0; 28 | margin-bottom: $space-2; 29 | } 30 | 31 | ol, 32 | ul { 33 | padding-left: $space-3; 34 | } 35 | 36 | pre, 37 | code, 38 | samp { 39 | font-family: $monospace-font-family; 40 | font-size: inherit; 41 | } 42 | 43 | pre { 44 | margin-top: 0; 45 | margin-bottom: $space-2; 46 | overflow-x: scroll; 47 | } 48 | 49 | hr { 50 | margin-top: $space-3; 51 | margin-bottom: $space-3; 52 | } 53 | 54 | blockquote { 55 | margin-top: $space-3; 56 | margin-bottom: $space-3; 57 | margin-left: 0; 58 | padding-left: $space-2; 59 | padding-right: $space-2; 60 | } 61 | 62 | blockquote, 63 | blockquote p { 64 | font-size: $h3; 65 | font-style: italic; 66 | } 67 | 68 | h1, 69 | .h1 { 70 | font-size: $h1; 71 | } 72 | 73 | h2, 74 | .h2 { 75 | font-size: $h2; 76 | } 77 | 78 | h3, 79 | .h3 { 80 | font-size: $h3; 81 | } 82 | 83 | h4, 84 | .h4 { 85 | font-size: $h4; 86 | } 87 | 88 | h5, 89 | .h5 { 90 | font-size: $h5; 91 | } 92 | 93 | h6, 94 | .h6 { 95 | font-size: $h6; 96 | } 97 | 98 | .list-reset { 99 | list-style: none; 100 | padding-left: 0; 101 | } 102 | -------------------------------------------------------------------------------- /_posts/2018-06-10-automatic-gearbox-module-fuzzy-controller.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: Automatic GearBox Module with Fuzzy Controller 4 | date: 2018-06-10 12:31:19 5 | summary: 'Sistemul isi propune realizarea unui modul electronic, pentru schimbarea 6 | automata a vitezelor unui autovehicul, folosind o cutie de viteze automata. ' 7 | categories: research 8 | redirect_from: /research/2018/06/10/automatic-gearbox-module-with-fuzzy-controller/ 9 | --- 10 | 11 | Sistemul isi propune realizarea unui modul electronic, pentru schimbarea automata a vitezelor unui autovehicul, folosind o cutie de viteze automata. Factorii ce influenteaza sistemul sunt: 12 | 13 | * Viteza autoturismului 14 | * Turatia motorului 15 | * Modul de condus - modul de utilizare al autoturismului in functie de dorinta 16 | 17 | soferului. Presupunem ca selectia se va face in baza unui comutator si permite 3 18 | 19 | moduri de lucru: 20 | * Eco - un mod de condus specializat pentru un consum mic si un mod de poluare 21 | 22 | redus. In acest context motorul va opera cu turatii mici si viteza redusa. 23 | * City - un mod de condus specializat pentru modul de oras, viteze reduse, turatii 24 | 25 | mari pentru demaraje fapt datorat indicatiilor semafoarelor 26 | * Sport - in acest mod de condus se va utiliza motorul cu turatii mari si viteze 27 | 28 | mici sau mari. 29 | 30 | Se va utiliza un Controller cu logica Fuzzy care sa reactioneze conform variabilelor de intrare viteza, turatie si mod de condus, astfel incat sa gestioneze schimbarea treptei de viteze in mod automat. 31 | 32 | Intregul articol poate fi citit si descarcat [aici](http://libgen.io/book/index.php?md5=6C1FF04E74F0AC17DB2E1A130291BDF8). -------------------------------------------------------------------------------- /_posts/2018-08-08-bootable-windows-usb-from-mac.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "How to make a bootable Windows usb from your macbook" 4 | date: 2018-08-08 23:59:00 5 | summary: "Are you tired to search for a great tool to make an usb bootable from your macbook ? Check this out and find two of the best tools: Etcher or UNetbootin" 6 | keywords: "boot, usb, macbook, etcher, unetbootin, windows boot" 7 | categories: tools 8 | redirect_from: 9 | - /tools/2018/08/09/make-a-bootable-usb/ 10 | - /tools/bootable-usb-mac/ 11 | --- 12 | 13 | Make a bootable usb with Windows or Linux, from your macbook, that's sounds a little bit hard, but I know why you are here, so please continue to read. Few days ago, I encountered some troubles trying to make a bootable usb drive with Windows 10 from my macbook laptop. So I decided to make this post, to let you drink a coffee, instead of consuming time searching for help. 14 | 15 | For me, two apps, worked very well and I like them very much, because are intuitive and easy to use. Both of them are compatible with Windows, Linux and MacOS. 16 | 17 | ## Etcher 18 | 19 | I really like this one because the interface it's clean and the design looks more adapted to these days. 20 | 21 | ![etcher picture](https://etcher.io/static/screenshot.gif) 22 | 23 | You can find more info or download it from [here](https://etcher.io/) 24 | 25 | ## UNetbootin 26 | 27 | The graphic interface it's not so clean, but you can make a real deal with this tool. 28 | 29 | unetbootin 30 | 31 | For more details about this tool or download links please check [this](http://unetbootin.github.io/) 32 | 33 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | drafts_dir = '_drafts' 2 | posts_dir = '_posts' 3 | 4 | # rake post['my new post'] 5 | desc 'create a new post with "rake post[\'post title\']"' 6 | task :post, :title do |t, args| 7 | if args.title 8 | title = args.title 9 | else 10 | puts "Please try again. Remember to include the filename." 11 | end 12 | mkdir_p "#{posts_dir}" 13 | filename = "#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.downcase.gsub(/[^\w]+/, '-')}.md" 14 | puts "Creating new post: #{filename}" 15 | File.open(filename, "w") do |f| 16 | f << <<-EOS.gsub(/^ /, '') 17 | --- 18 | layout: post 19 | title: #{title} 20 | date: #{Time.new.strftime('%Y-%m-%d %H:%M')} 21 | categories: 22 | --- 23 | 24 | EOS 25 | end 26 | 27 | # Uncomment the line below if you want the post to automatically open in your default text editor 28 | # system ("#{ENV['EDITOR']} #{filename}") 29 | end 30 | 31 | # usage: rake draft['my new draft'] 32 | desc 'create a new draft post with "rake draft[\'draft title\']"' 33 | task :draft, :title do |t, args| 34 | if args.title 35 | title = args.title 36 | else 37 | puts "Please try again. Remember to include the filename." 38 | end 39 | mkdir_p "#{drafts_dir}" 40 | filename = "#{drafts_dir}/#{title.downcase.gsub(/[^\w]+/, '-')}.md" 41 | puts "Creating new draft: #{filename}" 42 | File.open(filename, "w") do |f| 43 | f << <<-EOS.gsub(/^ /, '') 44 | --- 45 | layout: post 46 | title: #{title} 47 | date: #{Time.new.strftime('%Y-%m-%d %H:%M')} 48 | categories: 49 | --- 50 | 51 | EOS 52 | end 53 | 54 | # Uncomment the line below if you want the draft to automatically open in your default text editor 55 | # system ("#{ENV['EDITOR']} #{filename}") 56 | end 57 | 58 | desc 'preview the site with drafts' 59 | task :preview do 60 | puts "## Generating site" 61 | puts "## Stop with ^C ( +C )" 62 | system "jekyll serve --watch --drafts" 63 | end 64 | 65 | desc 'list tasks' 66 | task :list do 67 | puts "Tasks: #{(Rake::Task.tasks - [Rake::Task[:list]]).join(', ')}" 68 | puts "(type rake -T for more detail)\n\n" 69 | end 70 | -------------------------------------------------------------------------------- /_sass/basscss/_syntax-highlighting.scss: -------------------------------------------------------------------------------- 1 | .highlight { 2 | -webkit-text-size-adjust: none; 3 | } 4 | 5 | .highlight .c, 6 | .highlight .cs, 7 | .highlight .cm, 8 | .highlight .cp, 9 | .highlight .c1 { 10 | color: $hljs-comment; 11 | font-style: italic; 12 | } 13 | 14 | .highlight .k, 15 | .highlight .kc, 16 | .highlight .kd, 17 | .highlight .kn, 18 | .highlight .kr, 19 | .highlight .kt, 20 | .highlight .kp { 21 | color: $hljs-keyword; 22 | } 23 | 24 | .highlight .na, 25 | .highlight .nb, 26 | .highlight .nc, 27 | .highlight .no, 28 | .highlight .nd, 29 | .highlight .ni, 30 | .highlight .ne, 31 | .highlight .nf, 32 | .highlight .nl, 33 | .highlight .nn, 34 | .highlight .nx { 35 | color: $hljs-name; 36 | } 37 | 38 | .highlight .mi, 39 | .highlight .il { 40 | color: $hljs-number; 41 | } 42 | 43 | .highlight .s, 44 | .highlight .sb, 45 | .highlight .sc, 46 | .highlight .sd, 47 | .highlight .s2, 48 | .highlight .s3, 49 | .highlight .sh, 50 | .highlight .si, 51 | .highlight .sx, 52 | .highlight .sr, 53 | .highlight .ss, 54 | .highlight .s1 { 55 | color: $hljs-string; 56 | } 57 | 58 | .hljs-title, 59 | .hljs-id, 60 | .scss .hljs-preprocessor { 61 | color: $hljs-title; 62 | font-weight: bold; 63 | } 64 | 65 | .highlight .k { 66 | font-weight: normal; 67 | } 68 | 69 | .highlight .nc, 70 | .highlight .no { 71 | color: $hljs-type; 72 | } 73 | 74 | .highlight .o { 75 | color: $hljs-tag; 76 | font-weight: normal; 77 | } 78 | 79 | .highlight .nb { 80 | color: $hljs-attribute; 81 | } 82 | 83 | .highlight .sr { 84 | color: $hljs-regexp; 85 | } 86 | 87 | .highlight .ss { 88 | color: $hljs-symbol; 89 | } 90 | 91 | .hljs-built_in { 92 | color: $hljs-built-in; 93 | } 94 | 95 | .hljs-preprocessor, 96 | .hljs-pragma, 97 | .hljs-pi, 98 | .hljs-doctype, 99 | .hljs-shebang, 100 | .hljs-cdata { 101 | color: $hljs-preprocessor; 102 | font-weight: bold; 103 | } 104 | 105 | .hljs-deletion { 106 | background: $hljs-deletion; 107 | } 108 | 109 | .hljs-addition { 110 | background: $hljs-addition; 111 | } 112 | 113 | .diff .hljs-change { 114 | background: $hljs-change; 115 | } 116 | 117 | .hljs-chunk { 118 | color: $hljs-chunk; 119 | } 120 | -------------------------------------------------------------------------------- /_posts/2018-04-26-setup-apache-host-as-proxy.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: How to setup an Apache Virtualhost as proxy 4 | date: 2018-04-26 12:31:19 +0000 5 | summary: How to setup an Apache Virtualhost as proxy 6 | categories: tutorials 7 | redirect_from: "/tutorials/2018/04/26/setup-virtualhosts-apache-as-proxy/" 8 | 9 | --- 10 | If you want to use apache to set a virtualhost and to use it as proxy, to pass one or more localhosts to internet, all you have to do is to follow few simple rules described below: 11 | 12 | 1. create file /etc/apache2/sites-available/VIRTUALHOST_NAME.conf 13 | 2. _sudo a2ensite virtual_host_file_name_ 14 | 15 | * to disable an existing conf file _sudo a2dissite virtual_host_file_name_ 16 | 17 | 1. move file in /etc/apache2/sites-enabled/VIRTUALHOST_NAME.conf 18 | 2. install ssl module _sudo a2enmod ssl_ 19 | 3. _sudo service apache2 reload_ 20 | 21 | Other commands for apache: 22 | 23 | * show all modules installed _apache2ctl -M_ 24 | * show logs _sudo systemctl status apache2.service_ 25 | 26 | References 27 | 28 | * DESIRED_PORT: represent the port where your current local server is running (node/go/etc server) 29 | * URL_ADDRESS: your DNS 30 | 31 | ```Bash 32 | 33 | #Redirect permanent / https://URL_ADDRESS 34 | #or 35 | ServerName URL_ADDRESS 36 | 37 | RewriteEngine on 38 | RewriteCond %{HTTPS} off 39 | RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 40 | 41 | 42 | 43 | 44 | 45 | ServerAdmin EMAIL 46 | ServerName URL_ADDRESS 47 | 48 | ProxyPreserveHost On 49 | ProxyPass / http://127.0.0.1:DESIRED_PORT/ 50 | ProxyPassReverse / http://127.0.0.1:DESIRED_PORT/ 51 | 52 | SSLEngine on 53 | SSLCertificateFile /home/ubuntu/certificates/certificate.crt 54 | SSLCertificateKeyFile /home/ubuntu/certificates/certificate.key 55 | SSLCertificateChainFile /home/ubuntu/certificates/certificate.ca.crt 56 | 57 | 58 | 59 | ``` 60 | 61 | This article can be found as well on Gist -------------------------------------------------------------------------------- /_sass/_forms.scss: -------------------------------------------------------------------------------- 1 | input, 2 | select, 3 | textarea, 4 | fieldset { 5 | font-size: $form-field-font-size; 6 | margin-top: 0; 7 | margin-bottom: $space-1; 8 | } 9 | 10 | input[type=text], 11 | input[type=datetime], 12 | input[type=datetime-local], 13 | input[type=email], 14 | input[type=month], 15 | input[type=number], 16 | input[type=password], 17 | input[type=search], 18 | input[type=tel], 19 | input[type=time], 20 | input[type=url], 21 | input[type=week] { 22 | box-sizing: border-box; 23 | height: $form-field-height; 24 | padding: $form-field-padding-y $form-field-padding-x; 25 | vertical-align: middle; 26 | -webkit-appearance: none; 27 | } 28 | 29 | select { 30 | box-sizing: border-box; 31 | line-height: 1.75; 32 | padding: $form-field-padding-y $form-field-padding-x; 33 | } 34 | 35 | select:not([multiple]) { 36 | height: $form-field-height; 37 | vertical-align: middle; 38 | } 39 | 40 | textarea { 41 | box-sizing: border-box; 42 | line-height: 1.75; 43 | padding: $form-field-padding-y $form-field-padding-x; 44 | } 45 | 46 | .form-stacked input, 47 | .form-stacked textarea, 48 | .form-stacked select { 49 | width: 100%; 50 | } 51 | 52 | .field-light { 53 | background-color: white; 54 | transition: box-shadow .2s ease; 55 | border-style: solid; 56 | border-width: $border-width; 57 | border-color: $border-color; 58 | border-radius: $border-radius; 59 | } 60 | 61 | .field-light:focus { 62 | outline: none; 63 | border-color: $blue; 64 | box-shadow: 0 0 2px rgba($blue,.5); 65 | } 66 | 67 | .field-light:disabled { 68 | color: $mid-gray; 69 | background-color: $darken-2; 70 | } 71 | 72 | .field-light:read-only:not(select) { 73 | background-color: $darken-2; 74 | } 75 | 76 | .field-light:invalid { 77 | border-color: $red; 78 | } 79 | 80 | .field-light.is-success { 81 | border-color: $green; 82 | } 83 | 84 | .field-light.is-warning { 85 | border-color: $yellow; 86 | } 87 | 88 | .field-light.is-error { 89 | border-color: $red; 90 | } 91 | 92 | 93 | .radio-light, 94 | .checkbox-light { 95 | transition: box-shadow .2s ease; 96 | } 97 | 98 | .radio-light { 99 | border-radius: 50%; 100 | } 101 | 102 | .radio-light:focus, 103 | .checkbox-light:focus { 104 | outline: none; 105 | box-shadow: 0 0 2px rgba($blue, .5); 106 | } 107 | -------------------------------------------------------------------------------- /_posts/2018-05-23-how-I-started-to-build-a-chatbot.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: How I started to build a chatbot 4 | summary: "This article it's the first from a future series. Presents the idea behind the scene, how I started to think on it" 5 | date: 2018-05-23 12:31:19 6 | categories: ai chatbots 7 | redirect_from: /ai/chatbots/2018/05/23/how-I-started-to-build-a-chatbot/ 8 | --- 9 | 10 | # So let's begin 11 | 12 | I'm not here to say how brave I am. or something else, but trying to listen to a good guy on [youtube](https://www.youtube.com/channel/UCFh7FvnJ_0sVP4V0rZe6AaA) and thinking on my dissertation which comes soon and to the fact that I need to choose a subject for my final project, having the shower on top of me I got this briliant idea. So yea I say let's build something to help people and John was talking about some guys which are in college and wants to learn programming and I remember how hard was for me to find informations from many and many places to put them together and in the end to have something real which can help people all over the world. 13 | 14 | # The big idea 15 | 16 | So I was there with the wather wetting my body and having the opportune time for relax, I tought ... let's build a chatbot for students, something which will listen to them and will reply to them about subject like 'How can I find my career', 'Where should I move after university?', 'What comes after highschool?', so in a more meaningful terms a chatbot which helps people to find their vocation and to answer to this kind of subject. 17 | 18 | # The research 19 | 20 | I finish my bath and I put my pants back in bed, so guess what.. I couldn't sleep, because I had a lot of great ideas and my mind was shotted with many and many things. 21 | 22 | The second they I did a short research in the area and I discovers some great platforms that are already doing this like [wit.ai](http://wit.ai){:target="_blank"}, [api.ai](http://api.ai){:target="_blank"}, [IBM Watson](https://www.ibm.com/watson/){:target="_blank"}, [Microsoft Luis](https://www.luis.ai/){:target="_blank"}, all these info can be found in details on [this article](https://medium.com/@abraham.kang/understanding-the-differences-between-alexa-api-ai-wit-ai-and-luis-cortana-2404ece0977c){:target="_blank"} 23 | 24 | # End of first story 25 | 26 | IDK exactly what to choose, I'm thinking maybe to play the game from scratch.. let's see.. don't go anywhere and keep an eye on me. You can use the [News Feed](/feed.xml){:target="_blank"} -------------------------------------------------------------------------------- /_posts/2018-04-14-format-usb-to-fat16-or-fat32-mac.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "How to format an usb drive to fat16 or fat 32 on mac" 4 | date: 2018-04-14 12:31:19 5 | summary: "How to format an usb drive to fat16 or fat 32 on mac" 6 | categories: tutorials 7 | redirect_from: /tutorials/2018/04/14/how-to-format-an-usb-drive-to-fat16-or-fat32-on-mac/ 8 | --- 9 | 10 | Today I want to show you a simple trick that works simply and precise. 11 | 12 | All you have to do is to open you terminal and to run the following commands 13 | 14 | 1. List all the disks inside your computer, to find name of the disk that you want to format in the next step 15 | `diskutil list` 16 | 17 | ## Example 18 | 19 | ```Bash 20 | Macs-MacBook-Pro:~ boobo94$ diskutil list 21 | /dev/disk0 (internal, physical): 22 | #: TYPE NAME SIZE IDENTIFIER 23 | 0: GUID_partition_scheme *251.0 GB disk0 24 | 1: EFI EFI 209.7 MB disk0s1 25 | 2: Apple_APFS Container disk1 250.8 GB disk0s2 26 | 27 | /dev/disk1 (synthesized): 28 | #: TYPE NAME SIZE IDENTIFIER 29 | 0: APFS Container Scheme - +250.8 GB disk1 30 | Physical Store disk0s2 31 | 1: APFS Volume Untitled 114.5 GB disk1s1 32 | 2: APFS Volume Preboot 22.8 MB disk1s2 33 | 3: APFS Volume Recovery 517.8 MB disk1s3 34 | 4: APFS Volume VM 2.1 GB disk1s4 35 | 36 | /dev/disk2 (external, physical): 37 | #: TYPE NAME SIZE IDENTIFIER 38 | 0: GUID_partition_scheme *16.3 GB disk2 39 | 1: EFI EFI 209.7 MB disk2s1 40 | 2: Microsoft Basic Data MUZICA 16.0 GB disk2s2 41 | ``` 42 | 43 | 2. Format your usb drive 44 | 45 | `diskutil eraseDisk "MS-DOS FAT16" SOMENAME /dev/disk#` 46 | 47 | ## Wiki: 48 | 49 | + SOMENAME - here you can put the name that you want to be displayed on you computer in the future 50 | + FAT16 - if you want to use fat32, please just replace 16 with 32 51 | + /dev/disk# - replace # with your disk number, for example if I want to format that usb connected to my computer,its name is /dev/disk2 -------------------------------------------------------------------------------- /contact.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Contact 4 | permalink: /contact/ 5 | tags: contact 6 | --- 7 | 8 |
9 | {% if site.ajaxify_contact_form %} 10 |
11 | 15 | 16 | 20 | 21 | 22 | 23 | 24 |
25 | {% else %} 26 |
27 | 31 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | {% endif %} 43 |
44 | 45 |

Subscribe

46 |
48 |

Enter your email address:

49 |

50 | 51 |

52 | 53 | 54 | 55 |
56 | 57 | {% if site.ajaxify_contact_form %} 58 | {% include ajaxify_content_form.html %} 59 | {% endif %} 60 | -------------------------------------------------------------------------------- /_posts/2018-04-18-RESTful-api-resources.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "RESTful API Architecture - Resources" 4 | date: 2018-04-18 12:31:19 5 | summary: "I'm writing this article because when I started to look into this area I searched a lot after the best information that can help me to achieve a high level to design the best RESTful API architecture." 6 | categories: webservice 7 | tags: research webservice 8 | redirect_from: /research/webservice/2018/04/18/RESTful-api-architecture-resources/ 9 | --- 10 | 11 | # RESTful API Architecture - Resources 12 | 13 | I'm writing this article because when I started to look into this area I searched a lot after the best information that can help me to achieve a high level to design the best RESTful API architecture. 14 | Here you can find a list of resources which describes from the basic to the highest level. 15 | 16 | ## Best practice to develop an API 17 | 18 | - {:target="_blank"} 19 | - {:target="_blank"} 20 | - {:target="_blank"} 21 | - {:target="_blank"} 22 | - {:target="_blank"} 23 | - {:target="_blank"} 24 | - {:target="_blank"} 25 | - {:target="_blank"} 26 | - {:target="_blank"} 27 | - {:target="_blank"} 28 | - {:target="_blank"} 29 | - {:target="_blank"} 30 | - {:target="_blank"} 31 | - {:target="_blank"} 32 | - {:target="_blank"} 33 | 34 | 35 | ### Other resources 36 | 37 | - {:target="_blank"} 38 | 39 | ## What to know as a back-end developer 40 | 41 | - {:target="_blank"} 42 | -------------------------------------------------------------------------------- /_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {% assign minutes = content | strip_html | number_of_words | divided_by: 180 %} 6 | {% if minutes == 0 %} 7 | {% assign minutes = 1 %} 8 | {% endif %} 9 | 10 |
11 |

{{ page.title }}

12 |
13 | {% if page.update_date %} 14 |
15 | {% endif %} 16 | 23 |
24 | 25 |
26 | {{ content }} 27 |
28 | 29 | {% if site.show_sharing_icons %} 30 | {% include share_buttons.html %} 31 | {% endif %} 32 | 33 | {% if site.show_post_footers %} 34 | {% include post_footer.html %} 35 | {% endif %} 36 | 37 | {% if txtpen.txtpen_sitename %} 38 | 54 | 55 | {% endif %} 56 | 57 | {% if site.facebook_comments %} 58 |
59 | {% endif %} 60 | 61 | {% if site.show_related_posts %} 62 |

{{ site.text.post.related_posts }}

63 | {% for post in site.related_posts %} 64 |
65 | 66 |

{{ post.title }}

67 |

{{ post.summary }}

68 |
69 |
70 | {% endfor %} 71 | {% endif %} 72 | -------------------------------------------------------------------------------- /_posts/2018-09-10-keep-changelog-file.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 3 reasons to keep a changelog for your project [developer tips] 3 | layout: post 4 | categories: tips 5 | date: 2018-09-10 19:09:38 +0000 6 | summary: A changelog file it's just a history of changes made for a project. It's 7 | very useful to keep track of everything into a single place and to summarize some 8 | features than to look throw all the commits from git repository. 9 | keywords: '' 10 | tags: 11 | - tips 12 | - changelog 13 | - projects 14 | redirect_from: [] 15 | 16 | --- 17 | ![](https://keepachangelog.com/assets/images/logo-fe0986a5.png) 18 | 19 | ## Changelog file, what this means ? 20 | 21 | Did you forgot what you implemented two months ago ? If the answer is no, probably you don't need lecithin. But I don't think that's the answer. 22 | 23 | A changelog file it's just a history of changes made for a project. It's very useful to keep track of everything into a single place and to summarize some features than to look throw all the commits from git repository. 24 | 25 | ## Why to keep a Changelog ? 26 | 27 | Personally the most important thing for me it's to keep track of all the changes that I made for a project, specially for webservices, because I need to know what resource I added, changed, removed or if I need fixed a bug or something it's deprecated. 28 | 29 | The second reason it's about knowing which are the latest changes [deployed](/ai/5-questions-build-custom-alexa-skill/). Being involved into a big project with multiple developers, branches and features that must be deployed at some points can be hard, because you need to know what was deployed and probably when. I found it very useful to have a header with Unreleased changes. 30 | 31 | The last reason that I think it's relevant here it's about versions and dates when the deploys were changed. Sometimes we need to know for a specific [version](/tools/mail-server-localhost/) which was the changes and when were deployed. 32 | 33 | ## How to do it ? 34 | 35 | When I searched for this question I got the best answer for me [here](https://keepachangelog.com/en/1.0.0/). Keep a Changelog file it's an open-source project under [MIT License](https://choosealicense.com/licenses/mit/). Have a simple but powerful structure and [keep](/tools/bootable-windows-usb-from-mac/) tracking of everything I need. 36 | 37 | ### Most common types of changes 38 | 39 | * `Added` for new features. 40 | * `Changed` for changes in existing functionality. 41 | * `Deprecated` for soon-to-be removed features. 42 | * `Removed` for now removed features. 43 | * `Fixed` for any bug fixes. 44 | * `Security` in case of vulnerabilities. 45 | * `Unreleased` for undeployed. -------------------------------------------------------------------------------- /_posts/2018-02-18-setup-custom-service-ubuntu.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: Create systemd service - daemon (Ubuntu 15+) 4 | date: 2018-02-18 12:31:19 5 | summary: Create systemd service - daemon (Ubuntu 15+) 6 | categories: webservice 7 | redirect_from: /tutorials/2018/02/18/create-custom-service-ubuntu/ 8 | --- 9 | 10 | ## Setup 11 | 12 | Start by creating a file: `/etc/systemd/system/CUSTOM_SERVICE_NAME.service` with the following content: 13 | 14 | ``` 15 | [Unit] 16 | Description=CUSTOM_SERVICE_DESCRIPTION 17 | 18 | [Service] 19 | ExecStart=/opt/www/EXEC_FILE 20 | WorkingDirectory=/opt/www 21 | Restart=always 22 | 23 | [Install] 24 | WantedBy=multi-user.target 25 | ``` 26 | 27 | Enable the service. It will start automatically on boot, after that. 28 | 29 | ```bash 30 | $ sudo systemctl enable CUSTOM_SERVICE_NAME.service 31 | ``` 32 | 33 | Check status/start/stop/restart 34 | 35 | ```bash 36 | $ sudo systemctl {status|start|stop|restart} CUSTOM_SERVICE_NAME 37 | ``` 38 | 39 | A complete list with all available directives that can be used inside the service file can be found [here](https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files) 40 | 41 | ### Legend 42 | 43 | - CUSTOM_SERVICE_DESCRIPTION - a short description for the current service 44 | - CUSTOM_SERVICE_NAME - the name of service 45 | - EXEC_FILE - exec file name with the absolute path 46 | 47 | Example 1 for a webservice written in Golang 48 | 49 | You must have a new folder `api` in the root `/home/ubuntu/`. The `main` file it's the binary file resulted after go compilation. In my example I use flags to set environment `--env=dev`, this is not mandatory. 50 | 51 | ``` 52 | [Unit] 53 | Description= Go API Webservice Example 54 | 55 | [Service] 56 | ExecStart=/home/ubuntu/api/main --env=dev 57 | WorkingDirectory=/home/ubuntu/api 58 | Restart=always 59 | 60 | [Install] 61 | WantedBy=multi-user.target 62 | ``` 63 | 64 | Example 2 for a javascript 65 | 66 | You must have create a `web` folder into `/home/ubuntu/` root folder. The npm must be installed before and use the absolute path in `ExecStart` command, as you can see in the below example `/usr/bin/npm`. 67 | 68 | ``` 69 | [Unit] 70 | Description=Javascript Web Application Example 71 | 72 | [Service] 73 | ExecStart=/usr/bin/npm run start 74 | WorkingDirectory=/home/ubuntu/web/ 75 | Restart=always 76 | 77 | [Install] 78 | WantedBy=multi-user.target 79 | ``` 80 | 81 | ## Usefull command 82 | 83 | `$ service --status-all` - display all services 84 | 85 | - [ + ] for running services 86 | - [ - ] for stopped services 87 | - [ ? ] for services without a 'status' command 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /_includes/social_links.html: -------------------------------------------------------------------------------- 1 | 59 |
60 | -------------------------------------------------------------------------------- /_posts/2018-08-02-postgres-ubuntu-setup.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "How to setup a Postgres Server on Ubuntu" 4 | date: 2018-08-02 22:28:19 5 | summary: How to setup a Postgres Server on Ubuntu, create an user, access it remotely 6 | categories: tutorials 7 | tags: tutorials ubuntu database 8 | redirect_from: /tutorials/ubuntu/database/2018/08/03/how-to-setup-a-postgres-server-on-ubuntu/ 9 | --- 10 | 11 | ## Installing on Linux 12 | 13 | `$ sudo apt-get update` 14 | 15 | `$ sudo apt-get install postgresql postgresql-contrib` 16 | 17 | Switch over to the postgres account on your server by typing: 18 | 19 | `$ sudo -i -u postgres` 20 | 21 | You can now access a Postgres prompt immediately by typing: 22 | 23 | `$ psql`, exit with `\q` 24 | 25 | ## Creating user 26 | 27 | `$ sudo -u postgres createuser ` 28 | 29 | ## Creating Database 30 | 31 | `$ sudo -u postgres createdb ` 32 | 33 | ## Giving the user a password 34 | 35 | `$ sudo -u postgres psql` 36 | 37 | `psql=# alter user with encrypted password '';` 38 | 39 | ## Granting privileges on database 40 | 41 | `psql=# grant all privileges on database to ;` 42 | 43 | ## Access remotely 44 | 45 | 1. `$ sudo su - postgres` 46 | 2. `postgres:$ vi /etc/postgresql/9.5/main/postgresql.conf` 47 | Search after **listen_addresses** and uncomment that line or add this `listen_addresses = '*'` 48 | 3. `postgres:$ vi /etc/postgresql/9.5/main/pg_hba.conf` 49 | Append at the end of the file these: 50 | 51 | ```bash 52 | host all all 0.0.0.0/0 md5 53 | host all all ::/0 md5 54 | ``` 55 | 4. Restart postgres `$ sudo service postgresql restart` 56 | 57 | PS: Make sure that you have postgres version 9.5 `$ psql --version` . If the file it's empty try to use autocomplete `vi /etc/postgresql/` and then press tab for version autocomplete. 58 | 59 | ## Useful commands 60 | 61 | Show all databases `\l+` 62 | 63 | Show all roles `\du+` 64 | 65 | Show all tables `\dt` 66 | 67 | ## Reset auto increment counter in postgres 68 | 69 | Firstly you need to find your sequence identifier for the column that you want to reset the counter. Usually the name it's the name of the table followed by column name followed by `_seq`. 70 | 71 | Example: 72 | 73 | table name: 'users' 74 | column name: 'id' 75 | 76 | sequence name will be: `users_id_seq` 77 | 78 | First you need to find the current maximum value: 79 | 80 | ```sql 81 | SELECT setval('users_id_seq', max(id)) FROM accounts; 82 | ``` 83 | 84 | then you can reset it with one of these commands: 85 | 86 | ```sql 87 | SELECT setval('accounts_id_seq', DESIRED_VALUE); 88 | ``` 89 | 90 | or 91 | 92 | ```sql 93 | ALTER SEQUENCE accounts_id_seq RESTART WITH DESIRED_VALUE; 94 | ``` 95 | -------------------------------------------------------------------------------- /_sass/basscss/_utility-white-space.scss: -------------------------------------------------------------------------------- 1 | /* Basscss Utility White Space */ 2 | 3 | .m0 { 4 | margin: 0; 5 | } 6 | 7 | .mt0 { 8 | margin-top: 0; 9 | } 10 | 11 | .mr0 { 12 | margin-right: 0; 13 | } 14 | 15 | .mb0 { 16 | margin-bottom: 0; 17 | } 18 | 19 | .ml0 { 20 | margin-left: 0; 21 | } 22 | 23 | .m1 { 24 | margin: $space-1; 25 | } 26 | 27 | .mt1 { 28 | margin-top: $space-1; 29 | } 30 | 31 | .mr1 { 32 | margin-right: $space-1; 33 | } 34 | 35 | .mb1 { 36 | margin-bottom: $space-1; 37 | } 38 | 39 | .ml1 { 40 | margin-left: $space-1; 41 | } 42 | 43 | .m2 { 44 | margin: $space-2; 45 | } 46 | 47 | .mt2 { 48 | margin-top: $space-2; 49 | } 50 | 51 | .mr2 { 52 | margin-right: $space-2; 53 | } 54 | 55 | .mb2 { 56 | margin-bottom: $space-2; 57 | } 58 | 59 | .ml2 { 60 | margin-left: $space-2; 61 | } 62 | 63 | .m3 { 64 | margin: $space-3; 65 | } 66 | 67 | .mt3 { 68 | margin-top: $space-3; 69 | } 70 | 71 | .mr3 { 72 | margin-right: $space-3; 73 | } 74 | 75 | .mb3 { 76 | margin-bottom: $space-3; 77 | } 78 | 79 | .ml3 { 80 | margin-left: $space-3; 81 | } 82 | 83 | .m4 { 84 | margin: $space-4; 85 | } 86 | 87 | .mt4 { 88 | margin-top: $space-4; 89 | } 90 | 91 | .mr4 { 92 | margin-right: $space-4; 93 | } 94 | 95 | .mb4 { 96 | margin-bottom: $space-4; 97 | } 98 | 99 | .ml4 { 100 | margin-left: $space-4; 101 | } 102 | 103 | .mxn1 { 104 | margin-left: -$space-1; 105 | margin-right: -$space-1; 106 | } 107 | 108 | .mxn2 { 109 | margin-left: -$space-2; 110 | margin-right: -$space-2; 111 | } 112 | 113 | .mxn3 { 114 | margin-left: -$space-3; 115 | margin-right: -$space-3; 116 | } 117 | 118 | .mxn4 { 119 | margin-left: -$space-4; 120 | margin-right: -$space-4; 121 | } 122 | 123 | .mx-auto { 124 | margin-left: auto; 125 | margin-right: auto; 126 | } 127 | 128 | .p1 { 129 | padding: $space-1; 130 | } 131 | 132 | .py1 { 133 | padding-top: $space-1; 134 | padding-bottom: $space-1; 135 | } 136 | 137 | .px1 { 138 | padding-left: $space-1; 139 | padding-right: $space-1; 140 | } 141 | 142 | .p2 { 143 | padding: $space-2; 144 | } 145 | 146 | .py2 { 147 | padding-top: $space-2; 148 | padding-bottom: $space-2; 149 | } 150 | 151 | .px2 { 152 | padding-left: $space-2; 153 | padding-right: $space-2; 154 | } 155 | 156 | .p3 { 157 | padding: $space-3; 158 | } 159 | 160 | .py3 { 161 | padding-top: $space-3; 162 | padding-bottom: $space-3; 163 | } 164 | 165 | .px3 { 166 | padding-left: $space-3; 167 | padding-right: $space-3; 168 | } 169 | 170 | .p4 { 171 | padding: $space-4; 172 | } 173 | 174 | .py4 { 175 | padding-top: $space-4; 176 | padding-bottom: $space-4; 177 | } 178 | 179 | .px4 { 180 | padding-left: $space-4; 181 | padding-right: $space-4; 182 | } 183 | -------------------------------------------------------------------------------- /_includes/share_buttons.html: -------------------------------------------------------------------------------- 1 | 42 | -------------------------------------------------------------------------------- /_sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Typography 2 | $base-font-size: 14px !default; 3 | $bold-font-weight: bold !default; 4 | $font-family: 'Merriweather', 'PT Serif', Georgia, 'Times New Roman', serif !default; 5 | $line-height: 1.5 !default; 6 | $heading-font-family: 'Lato', 'Helvetica Neue', Helvetica, sans-serif !default; 7 | $heading-font-weight: 900 !default; 8 | $heading-line-height: 1.25 !default; 9 | $monospace-font-family: 'Source Code Pro', Consolas, monospace !default; 10 | $h1: 2.998rem !default; 11 | $h2: 1.5rem !default; 12 | $h3: 1.25rem !default; 13 | $h4: 1rem !default; 14 | $h5: .875rem !default; 15 | $h6: .75rem !default; 16 | $h00: 4rem !default; 17 | $h0: 3rem !default; 18 | $h00-responsive: 8vw !default; 19 | $h0-responsive: 6vw !default; 20 | $h1-responsive: 4vw !default; 21 | $h00-responsive-max: 7.68rem !default; 22 | $h0-responsive-max: 5.76rem !default; 23 | $h1-responsive-max: 3.84rem !default; 24 | $abbr-border-bottom: 1px black dotted; 25 | 26 | // Page width 27 | $measure-width: 42rem !default; 28 | 29 | // Viewport widths 30 | $viewport-small: 32em; 31 | $viewport-medium: 48em; 32 | $viewport-large: 64em; 33 | 34 | // Colors 35 | $blue: #0076df !default; 36 | $red: #f95020 !default; 37 | $green: #00cf26 !default; 38 | $yellow: #efcc00 !default; 39 | $orange: #ffcc22 !default; 40 | $purple: #f92080 !default; 41 | $dark-blue: #00369f !default; 42 | $green: #00ab37 !default; 43 | $dark-green: #009f06 !default; 44 | $light-pink: #ffdddd !default; 45 | $light-green: #ddffdd !default; 46 | $dark-gray: #333 !default; 47 | $mid-gray: #777 !default; 48 | $light-gray: #ccc !default; 49 | $lighter-gray: #eee !default; 50 | $darken-1: rgba(#000,.0625) !default; 51 | $darken-2: rgba(#000,.125) !default; 52 | $darken-3: rgba(#000,.25) !default; 53 | $darken-4: rgba(#000,.5) !default; 54 | 55 | // Links 56 | $link-color: $blue; 57 | $link-hover-color: darken($blue, 40%); 58 | 59 | // Breakpoints 60 | $breakpoint-md: '(min-width: 52em)'; 61 | $breakpoint-xl: '(min-width: 96em)'; 62 | 63 | // Whitespace 64 | $space-1: .5rem !default; 65 | $space-2: 1rem !default; 66 | $space-3: 2rem !default; 67 | $space-4: 4rem !default; 68 | 69 | // Buttons 70 | $button-font-size: inherit !default; 71 | $button-font-weight: normal !default; 72 | $button-line-height: 1.125rem !default; 73 | $button-padding-y: .5rem !default; 74 | $button-padding-x: 1rem !default; 75 | $button-font-family: $heading-font-family; 76 | 77 | // Forms 78 | $form-field-font-size: 1rem !default; 79 | $form-field-height: 2.25rem !default; 80 | $form-field-padding-y: .5rem !default; 81 | $form-field-padding-x: .5rem !default; 82 | 83 | // Borders 84 | $border-color: $light-gray !default; 85 | $border-width: 1px !default; 86 | $border-radius: 3px !default; 87 | 88 | // Forms 89 | $form-field-font-size: 1rem; 90 | $form-field-height: 2.25rem; 91 | $form-field-padding-y: .5rem; 92 | $form-field-padding-x: .5rem; 93 | 94 | // Code 95 | $pre-border-radius: 0; 96 | $pre-background-color: #fafafa; 97 | $hljs-comment: $mid-gray; 98 | $hljs-keyword: $dark-blue; 99 | $hljs-name: $dark-gray; 100 | $hljs-number: $dark-green; 101 | $hljs-string: $red; 102 | $hljs-title: $red; 103 | $hljs-type: $dark-blue; 104 | $hljs-tag: $dark-blue; 105 | $hljs-attribute: $dark-green; 106 | $hljs-regexp: $dark-green; 107 | $hljs-symbol: $purple; 108 | $hljs-built-in: $dark-blue; 109 | $hljs-preprocessor: $mid-gray; 110 | $hljs-deletion: $light-pink; 111 | $hljs-addition: $light-green; 112 | $hljs-change: $dark-blue; 113 | $hljs-chunk: $light-gray; 114 | 115 | // Footer 116 | $footer-border-top: thin solid #f3f3f3; 117 | $footer-padding: $space-3; 118 | $footer-color: #7a7a7a; 119 | $footer-bg-color: #fafafa; 120 | $footer-font-weight: 300; 121 | $footer-font-size: .75rem; 122 | -------------------------------------------------------------------------------- /about.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: About me 4 | permalink: /about/ 5 | tags: about 6 | --- 7 | 8 | Bogdan Alexandru Militaru 9 | 10 | ## Personal Info 11 | 12 | | **Location**| Bucharest,
Romania| 13 | | **Languages** | Romanian   •••••
English        ••••
French         ••
Spanish       ••| 14 | | **Driving License** | B | 15 | 16 | ## Education 17 | 18 | | **Electrical Engineering & Inteligent Systems**
University of Pitesti
2017 → 2019 | description | 19 | | **Computer Engineering**
University of Pitesti
2013 → 2017 | description | 20 | | **Math and Computer Science**
"Ion Mihalache" High School
2009 → 2013 | math, computer science, physics, science, chemestry, history, geography, romanian language, english language | 21 | 22 | ## Work 23 | 24 | | **Full Stack Developer**
*Airtouch New Media*
Jul 2016 → Current |- front-end development
- back-end development
- mobile development using hybrid technologies ( cordova, ionic )
- bug fixes
- maintenance
- team work
- project management
- webservice development and maintenance
- AWS Management
- database administration| 25 | | **Web Developer** *Way 2 Web Development SRL*
Apr 2015 → Nov 2015 | Created custom platform developed in php Work with php framework called Codeigniter Work with html,css,php,jquery,bootstrap,javascript,json Database Manipulation CSV Manipulation Improved skills of SEO optimization website Websites development Websites mainntenance Knowledge of OOP Work with Google API’s Learned Mangento Administration Developed functionalities for Mangento Work with deadline Self learning improvement | 26 | | **Web Developer - Internship**
*Roweb Development SRL*
Jun 2014 → Feb 2015 | I learned about HTML, CSS, PHP, JavaScript and also I used frameworks like Bootstrap, jQuery, Codeigniter. Developed Layouts using HTML and CSS Developed an online books library developed with native PHP and after that I rebuilt it using Codeigniter. The user can creates an account,set his profile and then he have access to add books to the cart, increase or decrease the quantity in the cart, delete the products from the cart, sending an order. The admin can publish,modify or delete the books and are responsable for the ordering process. Developed a slider with JavaScript Wordpress administration skills Developed an Wordpress Themes and a custom taxonomy system Reproduced an website with many JavaScript Animation using HTML, CSS, JavaScript Working in a team Improve the communication | 27 | | **Chief Editor**
*RMTop Mathematic Magazine at "Ion Mihalache" High School*
Jan 2012 → May 2012 | - Microsoft Office skill
- Coordinator skills, I had to coordinate a team with five editors
- team work
- deadlines | 28 | 29 | ## Certificates 30 | 31 | | mar. 2016 | Digital Marketing - Digital Workshop | 32 | | apr. 2016 | Duolingo English Advanced Award | 33 | 34 | ``` 35 | _______ _________ 36 | | \ | | | | | 37 | | \ | | | | | 38 | | | | | | | | 39 | | | | | | | | 40 | | / | | | | | 41 | |______/ ______ ______ |______ ______ |_______| |_______| 42 | | \ / \ / \ | \ / \ | | 43 | | \ / \ / \ | \ / \ | | 44 | | | | __ | | __ | | | | | | | 45 | | | | | | | | | | | | | 46 | | / \ / \ / | / \ / | | 47 | |______/ \______/ \______/ |______/ \______/ ________| | 48 | ``` 49 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Site settings 2 | title: boobo94 | Articles about programming, technology, ai 3 | logo_title: boobo94 4 | email: militaru.bogdanalexandru@gmail.com 5 | author: Bogdan Alexandru Militaru 6 | description: "Discover more about me. Learn about web, technology, web services, artificial intelligence, servers, cloud, amazon, alexa skills, tutorials. Check it now!" 7 | baseurl: "" 8 | url: "http://www.boobo94.xyz" 9 | date_format: "%b %-d, %Y" 10 | header_pages: 11 | - about.md 12 | - contact.html 13 | 14 | # Google services 15 | google_verification: 16 | # Use either direct GA implementation or set up GTM account 17 | # - using both will skew your data (leave blank to not use at all) 18 | google_analytics: UA-113538337-2 19 | google_tag_manager: 20 | # Bing services 21 | bing_verification: 22 | 23 | # Optional features 24 | animated: true 25 | show_related_posts: false 26 | show_post_footers: false 27 | show_social_icons: true 28 | ajaxify_contact_form: false 29 | enable_mathjax: false 30 | extended_fonts: false 31 | enable_anchorjs: false 32 | # Preview image for social media aka og:image and twitter:image 33 | post_preview_image: true 34 | 35 | # Facebook Page integration 36 | # (for instant articles and other stuff) 37 | fb_page: false 38 | fb_page_id: 39 | 40 | # Disqus post comments 41 | # (leave blank to disable Disqus) 42 | disqus_shortname: 43 | 44 | # txtpen post comments 45 | # (leave blank to disable txtpen) 46 | txtpen_sitename: 47 | 48 | # Facebook Comments plugin 49 | # (leave blank to disable Facebook Comments, otherwise set it to true) 50 | facebook_comments: true 51 | facebook_appid: 52 | facebook_comments_number: 10 53 | 54 | # Social icons 55 | github_username: boobo94 56 | reddit_username: 57 | bitbucket_username: 58 | stackoverflow_id: 4471897 59 | twitter_username: 60 | skype_username: boobo_boobo94 61 | steam_nickname: 62 | google_plus_id: 63 | linkedin_username: bogdan-alexandru-militaru-bb801697 64 | angellist_username: 65 | medium_id: boobo94 66 | bitcoin_url: 67 | paypal_url: 68 | flattr_button: 69 | telegram_username: 70 | vk_id: 71 | 72 | # Post sharing icons 73 | show_sharing_icons: true 74 | # Change to 'true' to enable individual icons 75 | share_facebook: true 76 | share_twitter: true 77 | share_googleplus: true 78 | share_linkedin: true 79 | share_digg: false 80 | share_tumblr: false 81 | share_reddit: false 82 | share_stumbleupon: false 83 | share_hackernews: true 84 | 85 | text: 86 | pagination: 87 | newer: 'Newer' 88 | older: 'Older' 89 | share_buttons: 90 | text: 'Share this post!' 91 | facebook: 'Share on Facebook' 92 | twitter: 'Share on Twitter' 93 | googleplus: 'Share on Google+' 94 | linkedin: 'Share on LinkedIn' 95 | digg: 'Share on Digg' 96 | tumblr: 'Share on Tumblr' 97 | reddit: 'Share on Reddit' 98 | stumbleupon: 'Share on StumbleUpon' 99 | hackernews: 'Share on Hacker News' 100 | post: 101 | updated: 'Updated' 102 | minute_read: 'minute read' 103 | related_posts: 'Related Posts' 104 | index: 105 | coming_soon: 'Coming soon...' 106 | contact: 107 | email: 'Email Address' 108 | content: 'What would you like to say?' 109 | subject: 'New submission!' 110 | submit: 'Say Hello' 111 | ajax: 112 | sending: 'sending..' 113 | sent: 'Message sent!' 114 | error: 'Error!' 115 | thanks: 'Thanks for contacting us. We will reply as soon as possible.' 116 | og_locale: 'en_US' 117 | 118 | # Build settings 119 | markdown: kramdown 120 | redcarpet: 121 | extensions: ['smart', 'tables', 'with_toc_data'] 122 | permalink: /:categories/:title/ 123 | paginate: 5 124 | sass: 125 | style: compressed 126 | plugins: 127 | - jekyll-paginate 128 | - jekyll-sitemap 129 | - jekyll-redirect-from 130 | # https://github.com/jekyll/jekyll/issues/2938 131 | exclude: 132 | - Gemfile 133 | - Gemfile.lock 134 | - vendor 135 | 136 | collections: 137 | category: 138 | output: true 139 | 140 | defaults: 141 | - 142 | scope: 143 | path: "" 144 | type: category 145 | values: 146 | layout: "category" 147 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | {% if site.google_tag_manager %} 3 | 8 | {% endif %} 9 | 10 | 11 | {% if page.title %}{{ page.title | strip_html }} – {% endif %}{{ site.title | strip_html }} 12 | 13 | 14 | 15 | 16 | {% if page.meta_robots %} 17 | {% else %}{% endif %} 18 | 19 | {% if site.fb_page %}{% endif %} 20 | {% if page.keywords %}{% endif %} 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {% if site.extended_fonts %} 29 | 30 | {% else %} 31 | 32 | {% endif %} 33 | {% if site.show_social_icons or site.show_sharing_icons %} 34 | 35 | {% endif %} 36 | 37 | 38 | {% if site.enable_mathjax %} 39 | 42 | {% endif %} 43 | 44 | 45 | {% if site.google_verification %} 46 | 47 | {% endif %} 48 | {% if site.bing_verification %} 49 | 50 | {% endif %} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | {% if site.post_preview_image %} 61 | 62 | {% endif %} 63 | 64 | 65 | 66 | {% if site.twitter_username %} 67 | 68 | 69 | {% endif %} 70 | 71 | 72 | 73 | {% if site.post_preview_image %} 74 | 75 | {% endif %} 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | {% if site.google_analytics %} 87 | 90 | {% endif %} 91 | 92 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pixyll 2 | 3 | [pixyll.com](http://www.pixyll.com) 4 | 5 | ![Pixyll screenshot](https://cloud.githubusercontent.com/assets/1424573/3847467/134aa236-1e66-11e4-8421-4e8c122118dc.png) 6 | 7 | Pixyll is a simple, beautiful theme for Jekyll that emphasizes content rather than aesthetic fluff. It's mobile _first_, fluidly responsive, and delightfully lightweight. 8 | 9 | It's pretty minimal, but leverages large type and drastic contrast to make a statement, on all devices. 10 | 11 | This Jekyll theme was crafted with <3 by [John Otander](http://johnotander.com) 12 | ([@4lpine](https://twitter.com/4lpine)). 13 | 14 | 中文版 . 15 | 16 | ## Getting Started 17 | 18 | If you're completely new to Jekyll, I recommend checking out the documentation at or there's a tutorial by [Smashing Magazine](http://www.smashingmagazine.com/2014/08/01/build-blog-jekyll-github-pages/). 19 | 20 | ``` 21 | $ git clone git@github.com:johnotander/pixyll.git 22 | $ cd pixyll 23 | $ gem install bundler # If you don't have bundler installed 24 | $ bundle install 25 | ``` 26 | 27 | #### Verify your Jekyll version 28 | 29 | It's important to also check your version of Jekyll since this project uses Native Sass which 30 | is [only supported by 2.0+](http://jekyllrb.com/news/2014/05/06/jekyll-turns-2-0-0/). 31 | 32 | ### Fork, then clone 33 | 34 | Fork the repo, and then clone it so you've got the code locally. 35 | 36 | 37 | ### Modify the `_config.yml` 38 | 39 | The `_config.yml` located in the root of the Pixyll directory contains all of the configuration details 40 | for the Jekyll site. The defaults are: 41 | 42 | ```yml 43 | # Site settings 44 | title: Pixyll 45 | email: your_email@example.com 46 | author: John Otander 47 | description: "A simple, beautiful theme for Jekyll that emphasizes content rather than aesthetic fluff." 48 | baseurl: "" 49 | url: "http://pixyll.com" 50 | 51 | # Build settings 52 | markdown: kramdown 53 | permalink: pretty 54 | paginate: 3 55 | ``` 56 | 57 | ### Jekyll Serve 58 | 59 | Then, start the Jekyll Server. I always like to give the `--watch` option so it updates the generated HTML when I make changes. 60 | 61 | ``` 62 | $ jekyll serve --watch 63 | ``` 64 | 65 | Now you can navigate to `localhost:4000` in your browser to see the site. 66 | 67 | ### Using Github Pages 68 | 69 | You can host your Jekyll site for free with Github Pages. [Click here](https://pages.github.com/) for more information. 70 | 71 | #### A configuration tweak if you're using a gh-pages sub-folder 72 | 73 | In addition to your github-username.github.io repo that maps to the root url, you can serve up sites by using a gh-pages branch for other repos so they're available at github-username.github.io/repo-name. 74 | 75 | This will require you to modify the `_config.yml` like so: 76 | 77 | ```yml 78 | # Site settings 79 | title: Repo Name 80 | email: your_email@example.com 81 | author: John Otander 82 | description: "Repo description" 83 | baseurl: "/repo-name" 84 | url: "http://github-username.github.io" 85 | 86 | # Build settings 87 | markdown: kramdown 88 | permalink: pretty 89 | paginate: 3 90 | ``` 91 | 92 | This will ensure that the the correct relative path is constructed for your assets and posts. Also, in order to run the project locally, you will need to specify the blank string for the baseurl: `$ jekyll serve --baseurl ''`. 93 | 94 | ##### If you don't want the header to link back to the root url 95 | 96 | You will also need to tweak the header include `/{{ site.baseurl }}`: 97 | 98 | ```html 99 | 109 | ``` 110 | 111 | A relevant Jekyll Github Issue: 112 | 113 | ### Contact Form 114 | 115 | The contact form uses . It will require you to fill the form out and submit it once, before going live, to confirm your email. 116 | 117 | More setup instructions and advanced options can be found at [http://formspree.io](http://formspree.io/) 118 | 119 | 120 | ### Disqus 121 | 122 | To configure Disqus, set up a [Disqus site](https://disqus.com/admin/create/) with the same name as your site. Then, in `_config.yml`, edit the `disqus_shortname` value to enable Disqus. 123 | 124 | ### txtpen 125 | 126 | To configure txtpen, set up a [txtpen site](https://txtpen.com/go) with the same name as your site. Then, in `_config.yml`, edit the `txtpen_sitename` value to enable txtpen 127 | 128 | ### Customizing the CSS 129 | 130 | All variables can be found in the `_sass/_variables.scss` file, toggle these as you'd like to change the look and feel of Pixyll. 131 | 132 | ### Page Animation 133 | 134 | If you would like to add a [fade-in-down effect](http://daneden.github.io/animate.css/), you can add `animated: true` to your `_config.yml`. 135 | 136 | ### AnchorJS 137 | 138 | [AnchorJS](https://github.com/bryanbraun/anchorjs): _A JavaScript utility for adding deep anchor links to existing page content. AnchorJS is lightweight, accessible, and has no dependencies._ You can turn it on by toggling `enable_anchorjs`. Because it offers many ways for customization, tweaks should be done in `_includes/footer.html`. Default settings after turning AnchorJS on are: 139 | 140 | ```html 141 | 145 | ``` 146 | 147 | See [documentation](http://bryanbraun.github.io/anchorjs/#basic-usage) for more options. 148 | 149 | ### Put in a Pixyll Plug 150 | 151 | If you want to give credit to the Pixyll theme with a link to or my personal website somewhere, that'd be awesome. No worries if you don't. 152 | 153 | ### Web analytics and search engines 154 | 155 | You can measure visits to your website either by using [Google Analytics](https://www.google.com/analytics/) tracking embed or the more advanced [Google Tag Manager](https://www.google.com/analytics/tag-manager/) container. 156 | * For Google Analytics set up the value for `google_analytics`, it should be something like `google_analytics: UA-XXXXXXXX-X`. 157 | * For Google Tag Manager set up the value for `google_tag_manager`, it should be something like: `google_tag_manager: GTM-XXXXX`. 158 | * _Do not_ set both of above methods because this will cause conflicts and skew your reporting data. 159 | * Remember that you need to properly configure the GTM container in its admin panel if you want it to work. More info is available in [GTM's docs](https://www.google.com/analytics/tag-manager/resources/). 160 | 161 | Your website is, by default, set to be allowed for crawling and indexing by search engines. (Unless you made yourself a custom robots.txt file). You can use front matter settings on each page to control how search engines will it. Sometimes you may want to exclude a particular page from indexing or forbid Google to store a copy of your page in its cache. It is up to you. Use the `meta_robots` frontmatter key and assign values based on [this table](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag?hl=en#valid-indexing--serving-directives). Some examples: 162 | 163 | ```yaml 164 | # exclude page from index 165 | meta_robots: noindex 166 | 167 | # allow indexing, disallow caching 168 | meta_robots: noarchive 169 | 170 | # allow indexing, disallow crawling links 171 | meta_robots: nofollow 172 | 173 | # disallow indexing, follow links 174 | meta_robots: noindex,follow 175 | ``` 176 | 177 | In order to get more information about your website's status in search engines, you can register it in [Google Search Console](https://www.google.com/webmasters/tools/home) and/or [Bing Webmaster Tools](http://www.bing.com/toolbox/webmaster). Both these tools will ask you to authorize your website with them and there are couple of ways to do that. Pixyll supports verification via meta tags - just fill in values for `google_verification` and/or `bing_verification` in `_config.yml`, the verification strings and meta tags will then be added automatically. 178 | 179 | If search engine optimization is your thing, you can also set up `meta_description` values for each page/post. By default Pixyll uses `summary` to populate the `` tag and falls back to `description` from `_config.yml` if `summary` is not present in page/post's front matter. The `summary` is also used for generating Open Graph tags. Why would you want to use a dedicated variable for meta description? Because character limit to properly display this description in search results (as a snippet) is way smaller than in Open Graph. It is recommended to keep it at 155-160 characters, for more in-depth info read [this article](https://moz.com/blog/i-cant-drive-155-meta-descriptions-in-2015). 180 | 181 | And lastly - if you happen to write in language other than English be sure to change `og_locale` in `_config.yml` to reflect it. 182 | 183 | ### Enjoy 184 | 185 | I hope you enjoy using Pixyll. If you encounter any issues, please feel free to let me know by creating an [issue](https://github.com/johnotander/pixyll/issues). I'd love to help. 186 | 187 | ## Upgrading Pixyll 188 | 189 | Pixyll is always being improved by its users, so sometimes one may need to upgrade. 190 | 191 | #### Ensure there's an upstream remote 192 | 193 | If `git remote -v` doesn't have an upstream listed, you can do the following to add it: 194 | 195 | ``` 196 | git remote add upstream https://github.com/johnotander/pixyll.git 197 | ``` 198 | 199 | #### Pull in the latest changes 200 | 201 | ``` 202 | git pull upstream master 203 | ``` 204 | 205 | There may be merge conflicts, so be sure to fix the files that git lists if they occur. That's it! 206 | 207 | #### Redirects with jekyll-redirect-from 208 | 209 | https://github.com/jekyll/jekyll-redirect-from 210 | 211 | ## Thanks to the following 212 | 213 | * [BASSCSS](http://basscss.com) 214 | * [Jekyll](http://jekyllrb.com) 215 | * [Refills](http://refills.bourbon.io/) 216 | * [Solarized](http://ethanschoonover.com/solarized) 217 | * [Animate.css](http://daneden.github.io/animate.css/) 218 | 219 | ## Contributing 220 | 221 | 1. Fork it 222 | 2. Create your feature branch (`git checkout -b my-new-feature`) 223 | 3. Commit your changes (`git commit -am 'Add some feature'`) 224 | 4. Push to the branch (`git push origin my-new-feature`) 225 | 5. Create new Pull Request 226 | -------------------------------------------------------------------------------- /_posts/2018-07-09-5-questions-build-custom-alexa-skill.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "5 common questions about how to build an Alexa Skill (Amazon Alexa)" 4 | date: 2018-07-09 00:00:00 5 | summary: "5 common questions how to build an Alexa Skill. Read about intents, utterances, slot types, invocation name. How to run a server locally or why to deploy on AWS Lambda Function over HTTPS servers." 6 | categories: ai 7 | tags: ai alexa-skill 8 | redirect_from: 9 | - /ai/alexa-skill/2018/07/09/how-to-build-a-skill-with-amazon-alexa/ 10 | - /ai/2018/07/09/alexa-skill/ 11 | --- 12 | 13 | Alexa Skill 14 | 15 | ## 1. Alexa Skill, where to start from ? 16 | 17 | The idea of this article it's to help you to develop a skill from scratch or based on a starter pack, this is an example [alexa-skill-starter-pack-typescript](https://github.com/boobo94/alexa-skill-starter-pack-typescript) from my github account. I dont' want to discuss too much about this starter pack, because you can find more details how to use it or where to start from in the [README.md](https://github.com/boobo94/alexa-skill-starter-pack-typescript/blob/master/README.md). So if you want to learn more about how to build alexa skill, keep reading. 18 | 19 | Recently, I started a new project, for the Spanish market. At this moment the market it's in the beginning phase, I'll probably disclosure more details in the future posts, but for the moment it's not very important. . Don't 20 | 21 | When I recently started the research, I had few questions about we will learn below: 22 | 23 | ## 2. How to build Alexa Skill ? 24 | 25 | When I started it was very tough for me to understand where to start from, what to read first or how to know what I need to learn. If you are here, probably you started already to read some documents from Amazon and guess what ?! you already discovered that Amazon have a comprehensive documentation about [how to build a custom skill](https://developer.amazon.com/docs/custom-skills/understanding-custom-skills.html) and the documentation explains very well how to do it. You don't have to read all, just to understand basics, keep reading this for help. 26 | 27 | I started to read about what it's an [Invocation Name](https://developer.amazon.com/docs/custom-skills/choose-the-invocation-name-for-a-custom-skill.html), [Intents](https://developer.amazon.com/docs/custom-skills/create-the-interaction-model-for-your-skill.html#intents-and-slots), [Intent Slots](https://developer.amazon.com/docs/custom-skills/create-intents-utterances-and-slots.html#identify-slots), [Utterances](https://developer.amazon.com/docs/custom-skills/create-the-interaction-model-for-your-skill.html#sample-utterances), [Slot Types](https://developer.amazon.com/docs/custom-skills/create-intents-utterances-and-slots.html#identify-slots). So if you check the links, you'll find the official definitions on Amazon Alexa Developers Portal, but let's explain them more simple than that. 28 | 29 | ### Invocation Name 30 | 31 | The invocation name represents the name used to invoke your skill. So if for example you want to build a skill which presents news about technology, a good invocation name can be "technology news" or "technology facts", so this it's the name which will open your skill, like you enter the name of a website in the web browser to open that website. 32 | 33 | There are some requirements about choosing the invocation name and you can read them [here](https://developer.amazon.com/docs/custom-skills/choose-the-invocation-name-for-a-custom-skill.html#cert-invocation-name-req). 34 | 35 | ### Intents 36 | 37 | So for the moment you know how to open the skill, but now we have the skill, how you can ask Alexa to open a section? Referring to the example presented before, we have a skill about technology news, but this it's a generic subject. If you want that your skill to be able to present informations about Artificial Intelligence, Programming Languages, New Smartphones etc.., you can create an intent for each of these departments. So when users says 'Alexa, ask technology news', Alexa will start a new session for my skill, but after that let say that user wants news about Artificial Intelligence and he will say something like 'Give me news about Artificial Intelligence' (this sentence it's an utterance, we'll discuss in the next chapter about them), defined under Artificial Intelligence intent, so Alexa will know, that my intention it's to get information about Artificial Intelligence. 38 | 39 | Let's recap, **an intent** represent an action wanted by user, what he needs. [Here](https://developer.amazon.com/docs/custom-skills/create-intents-utterances-and-slots.html#intent-name) you can find some rules about how to choose the best name for your intents. As well, there are some built in intents which can be found [here](https://developer.amazon.com/docs/custom-skills/built-in-intent-library.html). 40 | 41 | ### Utterances 42 | 43 | As I already told you, an utterance represents a sentence which it's part from an Intent and define particularly that Intent. This it's a very important part, that you should focus on and think for all variations which point to the same idea or multiple ways that a user can ask the same thing. For example, if I want news about Artificial intelligence, you can say it as below: 44 | 45 | 1. Offer me news about Artificial Intelligence 46 | 2. Give me informations about Artificial Intelligence 47 | 3. I want news about AI 48 | 4. More information about AI 49 | 50 | Don't be lazy and please not overrate your user, because not all of them are smart or maybe they are not used with AI, so please have in mind that your user can be not so clever and in that way, you'll make it better. Add as much as possible utterances you can to cover all the variations that a user can ask for an intent. 51 | 52 | If you want to know best practices and recommendations please [visit this](https://developer.amazon.com/docs/custom-skills/best-practices-for-sample-utterances-and-custom-slot-type-values.html) or rules [check here](https://developer.amazon.com/docs/custom-skills/create-intents-utterances-and-slots.html#h3_intentref_rules). 53 | 54 | ### Intent Slots 55 | 56 | So now, you know what it's an intent and an utterance, but an **intent slot** it's like a variable. For example if we have an intent to get distance between two points, point a to point b, we will have utterances like: 57 | 58 | 1. Give me distance from Paris to New York 59 | 2. How long it's between Budapest to Bucharest 60 | 61 | So we can identify two variables, _pointA_ and _pointB_, now we can rewrite rules like: 62 | 63 | 1. Give me distance from {pointA} to {pointB} 64 | 2. How long it's between {pointA} to {pointB} 65 | 66 | Alexa will match the value in his slot. You can read more about how to identify slots inside utterances or best practices [here](https://developer.amazon.com/docs/custom-skills/create-intents-utterances-and-slots.html#identify-slots). A slot can have a type, so if you want to know how to assign a slot type to a slot [read here](https://developer.amazon.com/docs/custom-skills/create-intents-utterances-and-slots.html#assign-slot-types). 67 | 68 | ### Slot Types 69 | 70 | A slot type represents the type of slot, it's like a variable type. There are [default value](https://developer.amazon.com/docs/custom-skills/slot-type-reference.html) builds by Amazon. If you want to discover best practices you can find [here](https://developer.amazon.com/docs/custom-skills/best-practices-for-sample-utterances-and-custom-slot-type-values.html#h3_custom_slot_values) 71 | 72 | You can exercise more by doing on your own in the [Developer Console](https://developer.amazon.com/alexa/console/ask) 73 | 74 | 75 | 76 | ## 3. How to run a server locally ? 77 | 78 | You can do it simple, just by downloading \[ngrok\](https://ngrok.com/) and create a server with the following code 79 | 80 | ```js 81 | import * as express from "express"; 82 | import * as bodyParser from "body-parser"; 83 | import { LambdaHandler } from "ask-sdk-core/dist/skill/factory/BaseSkillFactory"; 84 | import { RequestEnvelope } from "ask-sdk-model"; 85 | import { AddressInfo } from "net"; 86 | 87 | import { handler } from './lambda/custom/index' 88 | 89 | // Convert LambdaFunction to RequestHandler 90 | 91 | function ConvertHandler(handler: LambdaHandler): express.RequestHandler { 92 | return (req, res) => { 93 | handler(req.body as RequestEnvelope, null, (err, result) => { 94 | if (err) { 95 | return res.status(500).send(err); 96 | } 97 | return res.status(200).json(result); 98 | }); 99 | }; 100 | } 101 | 102 | // create server 103 | const server = express(); 104 | const listener = server.listen(process.env.port || process.env.PORT || 3000, function () { 105 | const { address, port } = listener.address() as AddressInfo; 106 | console.log('%s listening to %s%s', server.name, address, port); 107 | }); 108 | 109 | // parse json 110 | server.use(bodyParser.json()); 111 | 112 | // connect the lambda functions to http 113 | server.post("/", ConvertHandler(handler)); 114 | ``` 115 | 116 | Take a look at [this](https://github.com/boobo94/alexa-skill-starter-pack-typescript) alexa open source project. 117 | 118 | Open Terminal and run 119 | 120 | `$ ./ngrok http -bind-tls=true -host-header=rewrite 3000` 121 | 122 | Copy the https link and go to [Alexa Console](https://developer.amazon.com/alexa/console/ask/test/amzn1.ask.skill.15bebd4e-4520-4a06-8fb7-57149258f4d0/development/en_US), under Endpoint section, select **TTPS** and paste the link in **Default Region** input field. From the below dropdown, choose **My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority**. 123 | 124 | **Every time when you run the ngrok, you need to update the endpoint url.** 125 | 126 | ## 4. Should I choose Lambda Function or HTTPS server ? 127 | 128 | Depends by your skill, but probably the most of you can use Lambda Function. 129 | 130 | #### Why to choose Lambda: 131 | 132 | * you don't need to administrate any resource 133 | * don't need SSL certificate 134 | * don't need to verify where requests come from 135 | * AWS Lambda run only when a request comes 136 | * First 1M requests per month are free. [Read more about pricing](https://aws.amazon.com/lambda/pricing/) 137 | 138 | Read [here](https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-an-aws-lambda-function.html#about-lambda-functions-and-custom-skills) more about connecting Alexa with AWS Lambda or [here](https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-an-aws-lambda-function.html#create-a-lambda-function-for-an-alexa-skill) to create a Lambda for Alexa. 139 | 140 | #### Requirements for HTTPS Web Service: 141 | 142 | * The service must be Internet-accessible. 143 | * The service must adhere to the [Alexa Skills Kit interface](https://developer.amazon.com/docs/custom-skills/request-and-response-json-reference.html). 144 | * The service must support HTTP over SSL/TLS, leveraging an Amazon-trusted certificate. 145 | * The service must accept requests on port 443. 146 | * The service must validate that incoming requests are coming from Alexa. 147 | 148 | If you want to read more about configurations and requirements check [here](https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-a-web-service.html). 149 | 150 | ## 5. Where to start coding from ? 151 | 152 | Before to start any code, I suggest you to choose an SDK, if you want to code in javascript, **SDK v2** it's a better option than v1 and after that, you can take a look throw other alexa open source projects. You can find basic examples on [Alexa's Github profile](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs), but can search for more: [alexa-typescript-hello-world](https://github.com/Xzya/alexa-typescript-hello-world), [alexa-romanian-radio](https://github.com/Xzya/alexa-romanian-radio), [alexa-lambda-typescript](https://github.com/Xzya/alexa-lambda-typescript). I really recommand you to choose an sdk because it's more easier to interact with Amazon Alexa API. 153 | 154 | ## Summary 155 | 156 | What you've learned here will offer you a better overview about how to create alexa skills. You've learned about alexa skill intents, alexa slot types, alexa skill utterances, how to run a server locally and why to choose a Lambda function. 157 | 158 | What alexa skill do you want to build ? Please leave me a comment and I can offer you more advices. 159 | 160 | ### Resources 161 | 162 | - 163 | - 164 | - 165 | - 166 | - 167 | - 168 | -------------------------------------------------------------------------------- /_drafts/webservice-folder-structure.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Webservice Folder Structure 3 | layout: post 4 | categories: webservice 5 | date: 2018-09-26 19:07:54 +0000 6 | summary: webservice folder structure 7 | keywords: '' 8 | tags: 9 | - webservice 10 | - software-architecture 11 | - software 12 | - architecture 13 | - golang 14 | - go 15 | - models 16 | redirect_from: [] 17 | 18 | --- 19 | ![](/images/webservice-folder-structure-golang.png) 20 | 21 | Webservice folder structure is the first phase before building every project, it's like you prepare to build a house and start by creating the architecture plan. 22 | 23 | This article will present how I structure my projects when I need to create a simple web service in Golang. It's very important for you to keep a simple but intuitive architecture, because as you know, in golang you can call methods by referencing the package name. 24 | 25 | In the following lines I'll present a simple, but traditional model architecture used by me in most of the web services that I'm involved in. 26 | 27 | ## /api 28 | 29 | The api package is the folder where all the API endpoints are grouped into sub-packages by the purpose they serve. That means, I prefer to have a special package with it's main scope to solve a specific problem. 30 | 31 | For example all the login, register, forgot password, reset password handlers, I prefer to be defined into a package named **registration**. 32 | 33 | The registration package can look like below: 34 | 35 | . 36 | ├── api 37 | │ ├── auth 38 | │ │ ├── principal.middleware.go 39 | │ │ └── jwt.helper.go 40 | │ ├── cmd 41 | │ │ └── main.go 42 | │ ├── registration 43 | │ │ ├── login.handler.go 44 | │ │ ├── social_login.handler.go 45 | │ │ ├── register.handler.go 46 | │ │ ├── social_register.handler.go 47 | │ │ ├── reset.handler.go 48 | │ │ ├── helper.go 49 | │ │ └── adapter.go 50 | ├── cmd 51 | │ └── main.go 52 | ├── config 53 | │ ├── config.dev.json 54 | │ ├── config.local.json 55 | │ ├── config.prod.json 56 | │ ├── config.test.json 57 | │ └── config.go 58 | .......................... 59 | 60 | #### handler.go 61 | 62 | As you can see, there is a **handler.go** suffix in the name of the files. In these you can effectively write the code, which will handle the request, where the data requested will be retrieved from the database, processed and in the end the response will be composed. 63 | 64 | #### helper.go 65 | 66 | Sometimes, before sending the response, you need to collect data from multiple places to process them, and after that, when all the details are collected, the response can be sent to the client app. But the code must be kept as simple as possible in the handler, so all that extra code which is part of the process can be put here. 67 | 68 | #### adapter.go 69 | 70 | In the interaction between a client and a web service, they are sending and receiving data, but at the same time, there is probably a third party API involved, another application, or the database. Having this in mind, before transferring the data from an application to another one, we need to convert the format, before being accepted by the new app. This conversion function can be written here, in this _adapter.go_ file. 71 | 72 | ### /api/auth 73 | 74 | Most web services must have at least one authorization method implemented, like: 75 | 76 | * [OAuth](https://en.wikipedia.org/wiki/OAuth) — Open Authentication 77 | * Basic Authentication 78 | * Token Authentication (I prefer this one with JWT — [JSON Web Token](https://jwt.io)) 79 | * OpenID 80 | 81 | Personally, I use [JWT](https://jwt.io), because I write web services for our clients ([ATNM](https://www.airtouchmedia.com)), mostly for mobile apps or [CMS](https://en.wikipedia.org/wiki/Content_management_system). If you'd like to read more about the [Web Authentication API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API), Mozilla has a great article that explains it very well. 82 | 83 | ##### What is JWT ? 84 | 85 | > JSON Web Tokens are an open, industry standard [**RFC 7519**](https://tools.ietf.org/html/rfc7519) method for representing claims securely between two parties. 86 | 87 | ##### Why you should use JWT ? 88 | 89 | > * **Authorization**: This is the most common scenario for using JWT. Once the user is logged in, each subsequent request will include the JWT, allowing the user to access routes, services, and resources that are permitted with that token. Single Sign On is a feature that widely uses JWT nowadays, because of its small overhead and its ability to be easily used across different domains. 90 | > * **Information Exchange**: JSON Web Tokens are a good way of securely transmitting information between parties. Because JWTs can be signed—for example, using public/private key pairs—you can be sure the senders are who they say they are. Additionally, as the signature is calculated using the header and the payload, you can also verify that the content hasn't been tampered with. 91 | 92 | So, you have to verify the signature, to encode or decode the body, or to compose the JWT body. For this kind of processes I created the file _jwt.helper.go_, to keep a consistency and to find all the code related to JWT in a single place under the package _auth_. 93 | 94 | Let's discuss about the other file, from the _auth_ package, _principal.middleware.go_. The file has this name because it is the first middleware in the interaction with any API, so all the requests are coming through it. In this file I write a function which serves as a blocker for any requests, and if the rules are not passed, a **401 status code** will be sent as the response. Now, if you're asking which are those rules, we already talked about JWT, so attached to any request (except endpoints like login, register, which don't need authorization) the client must send an [HTTP header](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields), **Authorization**, which must contain the JWT token. 95 | 96 | As a sum up, if the client app doesn't send a token, or the token is corrupted or invalid, the web service will invalidate the request. 97 | 98 | ##### Where to get that token from ? 99 | 100 | Probably this is a question that you thought of while reading the previous paragraph, so let's make this clear. I mentioned that on login or register (and yes, probably other routes as well don't require authentication) you don't need to send a token, because you will actually get the token from these requests. So you fill in your credentials, and if they are right, you'll get a token in the response, on login, which will be sent for each request that imposes it. 101 | 102 | ## /cmd 103 | 104 | I always prefer to put the _main.go_ file in this package, which contains all the sub packages from a project. It's like a wrapper which encapsulate all the submodules, to work all together. 105 | 106 | **Why is name like that ?** It's simple, because _cmd_ is short for command. 107 | 108 | **What to understand through command?** A command represents a task which is part of something, call other tasks, or run independently. The _main.go_ file is a command which usually wraps all the functions and packages of a web service in a single file and calls just the main functions of any package. At any moment, if you want to remove a functionality, you can simply remove it just by commenting the instance from the main file. 109 | 110 | ## /config 111 | 112 | This package is very important in my opinion, because I found it very useful to keep all the configs in a single place and not search around in all the files of the project. In this package, I usually write a file called _config.go_ which contains the model for the configuration. This model is nothing more than a [structure](https://gobyexample.com/structs), for example: 113 | 114 | ```go 115 | type JWT struct { 116 | Secret string `required:"true"` 117 | } 118 | 119 | type Database struct { 120 | Dialect string `default:"postgres"` 121 | Debug bool `default:"false"` 122 | Username string `required:"true"` 123 | Password string `required:"true"` 124 | Host string `required:"true"` 125 | Port int 126 | SSLMode bool 127 | } 128 | 129 | type Configuration struct { 130 | Database Database `required:"true"` 131 | JWT JWT `required:"true"` 132 | } 133 | ``` 134 | 135 | But this, is just the structure definitions and we still need the real data to be placed somewhere. For that part I prefer to have multiple [JSON files](https://json.org), depends by environment and to name them like `config.ENV.json`. For the structs defined before a dummy JSON example is the following: 136 | 137 | ```json 138 | { 139 | "Database": { 140 | "Dialect": "postgres", 141 | "Debug": true, 142 | "Username": "postgres", 143 | "Password": "pass", 144 | "Host": "example.com", 145 | "Port": 5432, 146 | "SSLMode": true, 147 | }, 148 | "JWT": { 149 | "Secret": "abcdefghijklmnopqrstuvwxyz" 150 | } 151 | } 152 | ``` 153 | 154 | Let's talk about business, because this part is very special for me and very important for the time invested in finding the best answer. I don't know if you faced this problem or not, or for you, maybe it is not a problem, but I really encountered some problems trying to import the config in a good way. There are many possibilities, but I had to face the dilemma to choose between two: 155 | 156 | * passing the config object as a variable from main.go to the final function, where I need to use it. This for sure is a good idea, because I pass that variable just for those instances which need it, so in this way I don't compromise speed quality. But this is very time consuming for development or refactoring, because I need to pass the config from one function to another one all the time, so in the end, you want to kill yourself, meeh.., maybe not, but I still don't like it. 157 | * declaring a global variable and using that instance everywhere I need. But this is not the best option at all in my opinion, because I have to declare a variable, for example in main.go file, and later in the main function I need to `Unmarshal()` the JSON file, to put that content into the variable object declared as global. But guess what, maybe I'm trying to call that object before it's initialization is ready, so I'll have an empty object, with no real values, so in this case my app will crash. 158 | * inject the config object directly where I need, and yes, this is my best option which fits perfectly with me. In _config.go_ file, at the end of it, I declare the following lines: 159 | 160 | ```go 161 | var Main = (func() Configuration { 162 | 163 | var conf Configuration 164 | if err := configor.Load(&conf, "PATH_TO_CONFIG_FILE"); err != nil { 165 | panic(err.Error()) 166 | } 167 | return conf 168 | })() 169 | ``` 170 | 171 | What you need to know for this implementation is that I use a library called [Configor](https://github.com/jinzhu/configor) which unmarshals a file, in our case a JSON, and loads it into a variable `conf`, which is returned. 172 | 173 | Any time when you need to use something from the config, it's enough to type the package name, which is `config`, and to call the variable `Main`, as the following example which retrieves the configuration for the database: 174 | 175 | ```go 176 | var myDBConf = config.Main.Database 177 | ``` 178 | 179 | **!!!Tips**: As you can see, you must insert there the path to your config file, but because you want to have a different file for different environments, maybe you can set an environment variable called `CONFIG_PATH`. Define that as an env variable, or put it before you run your go like: 180 | 181 | ```bash 182 | CONFIG_PATH=home/username/.../config.local.json go run cmd/main.go 183 | ``` 184 | 185 | And instead of `PATH_TO_CONFIG_FILE` put `os.Getenv("CONFIG_PATH")`. This way, it doesn't where the path to your file is.. so you can skip some operating system errors. 186 | 187 | ## /db 188 | 189 | I like to keep my database connection logic and API handlers completely separate. 190 | 191 | * about db.go 192 | * about service.go 193 | * i preffer to use gorm talk about it 194 | 195 | ### /db/models 196 | 197 | * what is a model 198 | 199 | ### /db/handlers 200 | 201 | * this are queries .. but functions that will repeat all over the WS boilerplate code 202 | 203 | ## /gen 204 | 205 | Sometimes we use tools like swagger which generate some code.. will be easier to keep all that code in a single place 206 | 207 | ## /locales 208 | 209 | sometimes I need to have some translations for error messages or others .. depends by user's language preference 210 | 211 | about gotrans [https://github.com/bykovme/gotrans](https://github.com/bykovme/gotrans "https://github.com/bykovme/gotrans") 212 | 213 | ## /public 214 | 215 | * email templates 216 | * reset password form 217 | 218 | ## /utils 219 | 220 | here is the place where to put all the "tools" that helps you 221 | 222 | ## /vendor 223 | 224 | to keep all dependences together I use dep so where to place all those dependences if not in a folder like this 225 | 226 | about dep [https://github.com/golang/dep](https://github.com/golang/dep "https://github.com/golang/dep") 227 | 228 | **--leave me some comments ... --** -------------------------------------------------------------------------------- /_posts/2018-05-28-third-eye-blind-people-arduino.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Third eye for blind people" 4 | date: 2018-05-28 12:31:19 5 | summary: "Third eye for blind people" 6 | categories: research 7 | redirect_from: /research/2018/05/28/third-eye-for-blind-poeple-arduino/ 8 | --- 9 | 10 | # Senzori ultrasonici - Arduino 11 | 12 | ## Pentru depistarea obstacolelor, in supervizarea 13 | 14 | ## motricitatii persoanelor cu dizabilitati 15 | 16 | Militaru Bogdan Alexandru 17 | Facultatea de Electronica Calculatoare si Telecomunicatii 18 | Specializarea Inginerie Electrica si Sisteme Inteligente 19 | Disciplina Senzori Inteligenti 20 | 21 | 22 | ## Cuprins 23 | 24 | #### Senzori ultrasonici - Arduino 1 25 | 26 | 27 | ##### 1. Cerinte de proiectare 3 28 | 29 | 30 | ##### 2. Introducere 4 31 | 32 | 33 | ##### 3. Sisteme existente 5 34 | 35 | 36 | ##### 4. Aspecte teoretice 5 37 | 38 | 39 | ##### 4.1. Arduino Pro Mini 5 40 | 41 | 42 | ##### 4.2. Senzor Ultrasonic 6 43 | 44 | 45 | ##### Tipurile de senzori ultrasonici Microsonic: 6 46 | 47 | 48 | ##### 5. Proiectare 11 49 | 50 | 51 | ##### 5.1. Diagrama de circuit 12 52 | 53 | 54 | ##### 5.2. Montaj 13 55 | 56 | 57 | ##### 5.3. Programarea microcontrolleruli Arduino 14 58 | 59 | 60 | ##### Bibliografie 61 | 62 | 63 | ## 1. Cerinte de proiectare 64 | 65 | Se doreste realizarea unei aplicatii capabile sa identifice obstacolele aparute in calea unei 66 | persoane cu dizabilitati de vedere cu ajutorul unui microcontroler, Arduino si senzori ultrasonici 67 | pentru masurarea distantei fata de obstacole. 68 | 69 | Conceptul de utilizare consta in utilizarea a 6 module, plasate pe corpul persoanei in zonele 70 | cu un grad de accidentare ridicat: 71 | 72 | - Umeri 73 | - Genunchi 74 | - Palme 75 | 76 | Utilizarea unui modul pe una din palme este vitala deoarece, de obicei persoanele cu 77 | dizabilitati incearca sa identifice prin atingere, posibilele obstacole aflate in cale, astfel senzorii vor 78 | identifica obstacolul inainte de contactul fizic al persoanei cu obiectul. 79 | 80 | 81 | ## 2. Introducere 82 | 83 | Proiectul ce va fi descris in randurile urmatoare se doreste a fi o tehnologie portabila pentru 84 | oamenii cu dizabilitati de vedere. Ideea din spatele acestei tehnologii o reprezinta nevoile tot mai mari 85 | ale acestor oameni in zilele noastre, deoarece tehnologia avanseaza insa adaptarea la noile conditii 86 | poate fi dificila chiar si pentru cei fara probleme vizuale, masinile electrice nu produc zgomot, la 87 | supermaket avem usi ce se deschid pe senzor, usile liftului pot pune mari dificultati chiar si oamenilor 88 | fara un handicap vizual. Astfel un proiect de o asemenea anvergura se considera necesar. 89 | 90 | Proiectul propune crearea unor dispozitive portabile ce pot fi montate in mai putin de 1 minut 91 | de oricine si se bazeaza pe unde cu ultrasunete pentru a depista obstacolele din jur, in cazul in care 92 | unul dintre echipamente depiseazata un obstacol, soneria acestuia va produce un sunet asemanator 93 | senzorilor de parcare utilizati in industria auto, pentru a atentiona individul ca se apropie de un 94 | pericol. Modalitatea de prindere este una foarte simpla cu ajutorul unei bande elastice, se introduce pe 95 | mana sau picior. 96 | 97 | Conform statisticilor aproximativ 39 de milioane de oameni sufera ce aceasta boala pe glob. 98 | Aceste persoane sufera foarte mult in timpul unei zile, din cauza problemelor de deplasare ingreunate. 99 | Pana acum, persoanele foloseau celebrul baston alb, despre care se poate spune ca a fost unul foarte 100 | eficient pentru o perioada lunga de timp, insa cu toate acestea, prezinta o multime de dezavantaje. O 101 | alternativa era utilizarea animalelor de companie, precum cainii, insa costurile de intretinere sunt 102 | destul de mari. Astfel principalul obiectiv in dezvoltarea acestui proiect consta in realizarea unui 103 | dispozitiv ieftin si eficient care sa ofere un comfort in plimbari, viteza si incredere. 104 | 105 | Acest tip de proiect reprezinta un concept destul de nou, neabordat de foarte multe persoane, 106 | insa pe internet exista cateva reverinte [1], [2]. Exista cu siguranta o multitudine de sisteme pe piata, 107 | in acest moment care incearca sa rezolve acest handicap vizual, insa cele mai multe dintre ele au 108 | deficiente precum: greutate prea mare in transport sau necesitatea unui instructaj amanuntit in 109 | prealabil. 110 | 111 | ![general concept](/images/Page-3-Image-1.png) 112 | 113 | O particularitate a acestui proiect o reprezinta faptul ca este accesibila tuturor, costurile de 114 | productie fiind sub 100lei ( 20€ ). Iar avantajul particular il reprezinta faptul ca este usor de montat, 115 | transportat si utilizat. 116 | 117 | ## 3. Sisteme existente 118 | 119 | Asa cum am prezentat anterior in intorducere, exista cateva posibile modalitati de a rezolva 120 | problema persoanelor cu dizabilitati de vedere, precum basoton, caine de companie sau dispozitive 121 | smart. 122 | 123 | **Bastonul** 124 | 125 | Acesta este cu siguranta unul dintre cele mai utilizate dispozitive de catre nevazatori, insa exista 126 | foarte multe dezavantaje in utilizarea unui astfel de dispozitiv. Unul dintre principalele sale 127 | dezavantaje o constutie faptul ca aria de detectie este foarte restransa, campul senzorial fiind detectat 128 | doar in fata utilizatorului si doar pe o zona restransa, in care se afla varful bastonului, ceea ce face ca 129 | utilizatorul sa fie nevoit sa miste continuu bastonul pentru a acoperi o arie suficienta pentru o 130 | deplasare sigura. Un alt dezavantaj il constituie faptul ca intotdeauna una din maini este ocupata cu 131 | bastonul si astfel utilizatorului nu ii este oferita o libertate de care are nevoie. Alte probleme ce pot 132 | aparea sunt fisurile sau ruperea acestuia, blocarea bastonului in tufisuri, boscheti, gropi, etc. 133 | 134 | **Caine de companie** 135 | Cainii sunt cu siguranta o modalitate foarte buna de depalsare si ajutor pentru persoanele cu 136 | dizabilitati vizuale, insa costurile de intretinere si chiar achizitonare sunt destul de mari, deoarece 137 | dresajul pentru ca animalul sa fie capabil sa ofere incredere si suport este foarte scump. 138 | 139 | ## 4. Aspecte teoretice 140 | 141 | ### 4.1. Arduino Pro Mini 142 | 143 | Arduino este o companie open-source care produce atât plăcuțe de dezvoltare bazate 144 | pe microcontrolere, cât și partea de software destinată funcționării și programării acestora. Pe lângă 145 | acestea include și o comunitate uriașă care se ocupă cu creația și distribuirea de proiecte care au ca 146 | scop crearea de dispozitive care pot sesiza și controla diverse activități sau procese în lumea reală. 147 | 148 | Aceasta este versiunea Arduino Mini produsa de Sparkfun. Este proiectata special pentru a 149 | obtine performanta la cost redus. Platforma Arduino Pro Mini este identica cu Arduino Mini din punct 150 | 151 | 152 | de vedere al pinilor, doar ca dispune de un procesor ATMEGA 328 (in loc de 168). Pentru programare 153 | este necesar un conector FTDI.[5] 154 | 155 | **Specificatii** 156 | 157 | - ATMega328 la 16 MHz 158 | - suporta auto-reset 159 | - regulator 5V 160 | - suporta maxim 150 mA in curent de iesire 161 | - protectie la supracurent 162 | - protectie la inversarea polaritatii 163 | 164 | ### 4.2. Senzor Ultrasonic 165 | 166 | Senzorii ultrasonici emit pulsatii acustice scurte, de inalta frecventa, la intervale de timp 167 | regulate. Acestea se propaga prin aer cu viteza sunetului. Daca lovesc un obiect, acestea sunt 168 | reflectate inapoi ca semnale ecou la senzor, care calculeaza distanta pana la obiect pe baza intervalului 169 | de timp dintre emiterea semnalului si receptarea ecoului. 170 | 171 | Deoarece distanta pana la obiect este determinata prin masurarea timpului de deplasare a undelor si nu 172 | prin intensitatea sunetului, senzorii ultrasonici sunt excelenti pentru eliminarea interferentelor de 173 | fundal. 174 | In principiu, toate materialele care reflecta sunetul pot fi detectate, indiferent de culoarea lor. Chiar si 175 | materialele transparente sau folii subtiri nu reprezinta nicio problema pentru un senzor ultrasonic. 176 | Senzorii ultrasonici Microsonic sunt potriviti pentru distante de la 30 mm pana la 10 m si deoarece 177 | masoara timpul de deplasare, ei pot efectua o masuratoare cu precizie ridicata. Unii dintre senzorii 178 | nostri pot sa determine semnalul cu o precizie de mai putin de 0.18 mm. 179 | Senzorii ultrasonici pot sa vada prin aer plin de praf si prin vapori de cerneala. Chiar si depuneri 180 | subtiri pe membrana senzorului nu afecteaza functionarea acestuia. 181 | Senzori cu o zona fara vizibilitate de doar 30 mm si o dispersie a undelor foarte ingusta gasesc astazi 182 | aplicatii complet noi: masurarea nivelurilor in cutiile de iaurt si eprubete precum si scanarea sticlelor 183 | mici in sectorul de ambalare - nicio dificultate pentru senzorii nostri. Sunt detectate chiar si firele 184 | subtiri. 185 | 186 | #### Tipurile de senzori ultrasonici Microsonic: 187 | 188 | - Senzori ultrasonici de tip reflexiv; 189 | 190 | 191 | Reprezinta metoda clasica de detectie. Prin aceasta metoda contactul este activat, imediat ce obiectul 192 | este localizat în aria de detecţie presetată. 193 | 194 | - Senzori ultrasonici de tip fereastra; 195 | 196 | Prin acest mod contactul este activat, cand obiectul este localizat intr-o fereastra (zona) definita prin 197 | doua limite. Acest mod poate fi folosit pentru a monitoriza, de exemplu, marimea sticlelor de pe o 198 | banda rulanta (sticlele mai mari sau mai mici pot fi inlaturate). Contactul se activeaza in momentul in 199 | care obiectul depaseste limitele definite. 200 | 201 | - Senzori ultrasonici de tip bariera reflexiva; 202 | 203 | In acest mod se seteaza o fereastra, definita de doua limite, in care se introduce un reflector. Orice 204 | reflector, de exemplu si o foaie de metal. Contactul se activeaza in momentul in care obiectul de 205 | detectat acopera reflectorul. Acest mod de detectie este adecvat pentru a detecta materiale spumoase 206 | sau alte materiale ce au suprafete neregulate. 207 | 208 | 209 | - Senzori ultrasonici cu iesire analogica; 210 | 211 | Acesti senzori transmit masuratoarea ca o tensiune proporţionala (0-10V) sau curent (4...20mA). 212 | Pentru senzorii cu iesire analogica se poate seta: fereastra apropiata si cea indepartata si respectiv 213 | caracteristica lor daca este crescatoare sau descrescatoare. In functie de tipul senzorului si marimea 214 | ferestrei, rezolutia se încadrează undeva între 0,025 şi 0,36 mm. 215 | 216 | - Senzori ultrasonici de margine; 217 | 218 | Au o constructie de tip furca si au un principiu asemanator cu senzorii de tip bariera. Sunt folositi 219 | pentru monitorizarea de tipar si emit semnal analogic de 0-10V sau 4...20mA. 220 | 221 | - Senzori ultrasonici de control multistrat; 222 | 223 | Metoda de functionare este asemanatoare cu barierele uni-directionale si detecteaza una sau mai multe 224 | straturi de obiecte care se suprapun din greseala. Sistemul de emitator-receptor poate detecta: foi, 225 | filme, carton sau coli subtiri de metal. Iesirile de semnal sunt valabile pentru a indica straturile 226 | multiple sau lipsa obiecteleor de detectat. 227 | 228 | 229 | Senzorul utilizat pentru realizarea acestui proiect este HC-SR04 oferit de Sparkfun, 230 | devoltatorii care ofera si microcontrollerul Arduino. 231 | 232 | Acesta este un senzor de masurare cu ultrasunete. Acest senzor economic ofera functii de masurare 233 | non-contact de la 2 cm la 400 cm, cu o precizie de actiune care poate ajunge pana la 3 mm. Fiecare 234 | modul HC-SR04 include un transmitator cu ultrasunete, un receptor si un circuit de comanda. 235 | 236 | Exista doar patru pini pe care trebuiesc conectati la HC-SR04: VCC (Power), Trig (Trigger), Echo 237 | (Receive) si GND (Ground). Este foarte usor de configurat si utilizat. 238 | 239 | 240 | 241 | ## 5. Proiectare 242 | 243 | Asa cum prezinta si titlul proiectul va fi realizat pe baza unui microcontroller Arduino si 244 | senzori cu ultrasunete, insa pe langa aceste elemente esentiale, va nevoie de urmatoarele componente: 245 | 246 | - Arduino Pro Mini 328 - 5V/16MHz 247 | - Senzor cu ultrasunete HC-SR 248 | - Hartie de prototipare 249 | - Motoras vibrator 250 | - Buzzer 251 | - Led rosu 5mm 252 | - Switch 253 | - Conector mama 8 pozitii, o linie 0.1” 254 | - Conector tata 40 de pozitii 1 linie 0.1” 255 | - Fire jumber 256 | - Baterie 3.7V 257 | - Elastice sau abtipilduri^ 258 | 259 | 260 | ### 5.1. Diagrama de circuit 261 | 262 | Pentru inceput trebuiesc realizate conexiunile precum in figura urmatoare pentru conexiunea 263 | microcontrolerului Arduino cu senzorii cu ultrasunete, buzzer, motorasul de vibratie, led-ul indicator 264 | si switch-ul. 265 | 266 | Se vor conecta la GND de pe microcontroller impantarea (GND) de la led, motorasul vibrator si 267 | buzzer. 268 | +VE de la led si pinul mijlociu al switch-ului se vor conecta la pinul 5 269 | +VE de la buzzer se va conecta la primul pin al switch-ului 270 | +VE al motorasului vibrator se va conecta la ultimul pin al switch-ului 271 | 272 | Swtich-ul utilizat, are 2 pozitii ce permite comutarea intre buzzer sau vibrator, deoarece exista cazuri 273 | in care persoanele au si probleme auditive sau mediul inconjurator este unul foarte zgomots. 274 | 275 | ![Diagrama schema generala](/images/Page-12-Image-15.png) 276 | 277 | Pentru conectarea senzorului cu ultrasunete se va proceda in urmatorul mod: 278 | 279 | Pentru alimentare se va folosi acumulatorul de 3.7V specificat in lista de necesitati. Pentru 280 | conectivitate. Pinul GND de la microcontroller se va conecta la GND la acumulator, iar pinul +VCC 281 | al acumulatorului se va conecta la pinul de alimentare VCC de pe microcontroller. 282 | 283 | Senzor | Arduino 284 | VCC | VCC 285 | GND | GND 286 | PIN Trig | PIN 12 287 | PIN Echo | PIN 12 288 | 289 | ### 5.2. Montaj 290 | 291 | Pornind de la ideea prezentata de la inceput, ca dispzitivul trebuie sa aiba dimensiuni reduse 292 | si sa fie usor de montat si transportat, vom face montajul astfel incat dispozitivele sa ocupe un spatiu 293 | cat mai mic, dupa cum se poate oserva in imaginile urmatoare. 294 | 295 | Se vor monta initial pe hartia de prototipare mufele mama, buzzerul si apoi vibratorul, ledul si switch- 296 | ul. Urmand apoi sa se faca pe spatele hartiei de prototipare conexiunile aferente intre circuite, 297 | conform celor mentionate in schema de proiectare. Se vor adauga ulterior senzorii si microcontroller- 298 | ul Arduino. 299 | 300 | Acumulatorul va fi adaugat ulterior, putand fi lipit pe spatele dispozitivului cu silicon. In cazul in care 301 | se doreste realizarea acestui proces, este importanta ca in prealabil sa se faca o protectie a circuitelor 302 | pe spatele hartiei de prototipare, pentru a izola aparitia unor contacte nedorite dupa montajul 303 | acumulatorului. 304 | Dimensiunea pentru hartia de prototipare este de 5 x 3 cm. 305 | 306 | 307 | ### 5.3. Programarea microcontrolleruli Arduino 308 | 309 | Pentru proiectarea microcontroller-ului se poate utiliza unul din mediile de programare puse 310 | la dispozitie de dezvoltator Arduino IDE. [4] 311 | 312 | ``` C++ 313 | const int pingTrigPin = 12 ; //Trigger connected to PIN 7 314 | 315 | const int pingEchoPin = 10 ; //Echo connected yo PIN 8 316 | 317 | int buz= 5 ; //Buzzer to PIN 4 318 | 319 | void setup() { 320 | 321 | Serial.begin( 9600 ); 322 | 323 | pinMode(buz, OUTPUT); 324 | 325 | } 326 | 327 | void loop() 328 | 329 | { 330 | 331 | long duration, cm; 332 | 333 | pinMode(pingTrigPin, OUTPUT); 334 | 335 | digitalWrite(pingTrigPin, LOW); 336 | 337 | delayMicroseconds( 2 ); 338 | 339 | 340 | digitalWrite(pingTrigPin, HIGH); 341 | 342 | delayMicroseconds( 5 ); 343 | 344 | digitalWrite(pingTrigPin, LOW); 345 | 346 | pinMode(pingEchoPin, INPUT); 347 | 348 | duration = pulseIn(pingEchoPin, HIGH); 349 | 350 | cm = microsecondsToCentimeters(duration); 351 | 352 | if(cm<= 50 && cm> 0 ) 353 | 354 | { 355 | 356 | int d= map(cm, 1 , 100 , 20 , 2000 ); 357 | 358 | digitalWrite(buz, HIGH); 359 | 360 | delay( 100 ); 361 | 362 | digitalWrite(buz, LOW); 363 | 364 | delay(d); 365 | 366 | } 367 | 368 | Serial.print(cm); 369 | 370 | Serial.print("cm"); 371 | 372 | Serial.println(); 373 | 374 | delay( 100 ); 375 | 376 | } 377 | 378 | long microsecondsToCentimeters(long microseconds) 379 | 380 | { 381 | 382 | return microseconds / 29 / 2 ; 383 | 384 | } 385 | ``` 386 | 387 | ## Bibliografie 388 | 389 | 1. Youtube - 390 | 2. Youtube - 391 | 3. 392 | 4. 393 | 5. 394 | 6. 395 | 7. 396 | 397 | 398 | -------------------------------------------------------------------------------- /safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.11, written by Peter Selinger 2001-2013 9 | 10 | 12 | 272 | 274 | 275 | 486 | 487 | 813 | 815 | 817 | 818 | 820 | 822 | 823 | 825 | 827 | 829 | 830 | 832 | 834 | 835 | 836 | --------------------------------------------------------------------------------