Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am janis-kra on github.
  • I am janis (https://keybase.io/janis) on keybase.
  • I have a public key whose fingerprint is 95D2 2DAC 8D60 E257 22F4 97CE A9EC EC38 DA19 D0C6

To claim this, I am signing this object:

@janis-kra
janis-kra / index.html
Created June 28, 2016 21:05
markdown-live-preview
<div id='app' />
@janis-kra
janis-kra / how-not-to-do-it.html
Last active September 16, 2016 12:37
Extending Oracle JET with Google Sign-In — how not to do it
<html lang="en-us">
<head>
<title>Oracle JET & Google-Signin</title>
<meta name="google-signin-scope" content="profile email">
<meta name="google-signin-client_id" content="YOUR_TOKEN_HERE.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
@janis-kra
janis-kra / how-not-to-do-it-either.html
Last active September 16, 2016 12:39
Extending Oracle JET with Google Sign-In — how not to do it either
<div id="google-signin-button" class="g-signin2" data-onsuccess="onSignIn">Google Singin is loading</div>
@janis-kra
janis-kra / how-to-do-it.html
Last active September 16, 2016 12:41
Extending Oracle JET with Google Sign-In — how to do it
<button id="google-signin-button"
data-bind="ojComponent: {
component:'ojButton', label: 'Sign In',
icons: {start:'oj-fwk-icon oj-fwk-icon-signin'},
chroming: 'full'
}">
</button>
@janis-kra
janis-kra / Gruntfile.js
Created October 4, 2016 11:00
Utilizing the full potential of Grunt tasks: Initial Gruntfile
var path = require('path');
module.exports = function(grunt) {
require("load-grunt-config")(grunt,
{
configPath: path.join(process.cwd(), "scripts/grunt/config")
});
grunt.loadNpmTasks("grunt-oraclejet");
@janis-kra
janis-kra / Gruntfile.js
Created October 4, 2016 11:17
Utilizing the full potential of Grunt tasks: Gruntfile with initConfig
require('load-grunt-tasks')(grunt);
grunt.initConfig({
eslint: {
target: ['file.js']
}
});
grunt.registerTask('default', ['eslint']);
@janis-kra
janis-kra / eslint.js
Last active October 13, 2016 20:21
Utilizing the full potential of Grunt tasks: ESLint task configuration file
module.exports = {
options: {
configFile: '.eslintrc.js'
},
target: ['src/js/*.js', 'src/js/modules/*.js']
};
@janis-kra
janis-kra / .hyper.js
Created January 2, 2017 15:19
My hyper.js config
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Input',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.75)',
@janis-kra
janis-kra / pdfCreator.js
Last active June 11, 2017 18:21
Module for creating PDF files from user objects
/**
* Creates PDFs from TravelEntry objects
*/
define(['pdfmake', 'vfsfonts'], function (pdfmake) {
function createPDF (user) {
var table = [
[
{text: 'User', style: 'tableHeader'},
{text: '', style: 'tableHeader'}
],