Instantly share code, notes, and snippets.

View keybase.md

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:

View contact.js
class IndexPage extends React.Component {
constructor(props) {
super(props)
this.state = {
email: '',
}
}
View bootstrap.scss
@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";
View index.js
// src/index.js
const appStoreImg = require('../assets/images/app-store.png')
// ...
render() {
<div>
// ...
<a href="#"><img src={appStoreImg} height="50" alt=""></a>
// ...
View index.html
<!-- ... -->
<div>
<a href="#"><img src="assets/img/app-store.png" height="50" alt=""></a>
</div>
<!-- ... -->
View gatsby-config.js
module.exports = {
plugins: [
`gatsby-plugin-sass`
]
}
View sync.js
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.
*
View run.js
'use strict';
const sortModule = require('./sort');
/* Example array */
const array = [
{
name: 'Kostas',
age: 28
},
View main.js
/**
* 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
View main.yaml
- 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 ""