Skip to content

Instantly share code, notes, and snippets.

View kbariotis's full-sized avatar
🌏

Kostas Bariotis kbariotis

🌏
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kbariotis on github.
  • I am kbariotis (https://keybase.io/kbariotis) on keybase.
  • I have a public key ASAvMLWENqnjD5J1VRYcwlMumOY46GjHWQk0-Ci5CN2ZHwo

To claim this, I am signing this object:

@charset "UTF-8";
$bootstrap-sass-asset-helper: true;
@import "~bootstrap-sass/assets/stylesheets/bootstrap/variables";
$font-size-base: 16px;
@import "~bootstrap-sass/assets/stylesheets/bootstrap/mixins";
@import "~bootstrap-sass/assets/stylesheets/bootstrap/normalize";
@import "~bootstrap-sass/assets/stylesheets/bootstrap/print";
// src/index.js
const appStoreImg = require('../assets/images/app-store.png')
// ...
render() {
<div>
// ...
<a href="#"><img src={appStoreImg} height="50" alt=""></a>
// ...
<!-- ... -->
<div>
<a href="#"><img src="assets/img/app-store.png" height="50" alt=""></a>
</div>
<!-- ... -->
module.exports = {
plugins: [
`gatsby-plugin-sass`
]
}
@kbariotis
kbariotis / sync.js
Created July 15, 2017 06:35
Sync a DynamoDB table with ES Service
const AWS = require('aws-sdk');
const logger = require('./../lib/logger');
const docClient = new AWS.DynamoDB.DocumentClient();
const lambda = new AWS.Lambda();
/**
* Sync the whole DynamodDB Requests table
* with ES Service. Iterates the table by 1mb batches.
*
'use strict';
const sortModule = require('./sort');
/* Example array */
const array = [
{
name: 'Kostas',
age: 28
},
@kbariotis
kbariotis / main.js
Last active December 12, 2016 10:34
Flatten nested array using reduce
/**
* Takes a nested array and ftattens it
*
* @param {Array} val They input array
* @return {Array} val Flatten array
*/
function flatten(val) {
/*
* Recursively walk over the array and concat all elements back to the first level array
@kbariotis
kbariotis / main.yaml
Last active November 27, 2023 21:02
Ansible playbook for deploying a Node.js app to DigitalOcean
- name: DO
hosts: localhost
vars:
project_name: "PUT A NAME FOR YOUR PROJECT HERE"
do_token: "PUT YOUR DIGITAL OCEAN API KEY HERE ==> https://cloud.digitalocean.com/settings/api/tokens"
repository: "PUT YOUR REPOSITORY URL HERE"
tasks:
- name: LOCAL | Generate SSH key
shell: ssh-keygen -b 2048 -t rsa -f ~/.ssh/{{project_name}} -q -N ""
@kbariotis
kbariotis / index.html
Created November 17, 2016 09:37 — forked from nimbupani/index.html
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>