Skip to content

Instantly share code, notes, and snippets.

View markhker's full-sized avatar

Mark Hkr markhker

View GitHub Profile
@markhker
markhker / app.yaml
Last active August 29, 2015 14:13 — forked from darktable/app.yaml
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
@markhker
markhker / config.json
Created July 22, 2015 15:48 — forked from anonymous/config.json
Bootstrap Customizer Config, 20 Cols
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@markhker
markhker / gulpfile.js
Created December 14, 2015 22:33 — forked from torgeir/gulpfile.js
Example gulpfile.js
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
@markhker
markhker / app.yaml
Created March 24, 2016 20:04 — forked from addyosmani/app.yaml
Google App Engine (Python) - app.yaml for hosting a static site
application: your-app-name
version: 1
runtime: python27
api_version: 1
threadsafe: true
default_expiration: "30d"
handlers:
# web files
@markhker
markhker / 29392738.md
Created March 24, 2016 20:07 — forked from dustintheweb/29392738.md
Solution: Correctly configuring a static site with advanced routing - http://stackoverflow.com/posts/29392738

Ok I finally have this figured out.

First off, if you aren't familiar with the way GAE handles templating... it's a bit different than you would expect, but a pillar of getting this to work correctly.

This is what you want at the bottom of your app.yaml

- url: /
  static_files: dist/index.html
  upload: dist/index.html

expiration: "15m"

# Deploying NodeJS App on Google Cloud Platform
`authored Jul 3 2015 by kengz`
## Installation
- Account with Google Cloud Platform.
- Install [Google Cloud Platform SDK](https://cloud.google.com/sdk/) to use `cloud` in the terminal.
- Install [Docker](https://cloud.google.com/tutorials/install-docker) for the VM container.
- Locally, login for the first time: `gcloud auth login`

The apt-get version of node is incredibly old, and installing a new copy is a bit of a runaround.

So here's how you can use NVM to quickly get a fresh copy of Node on your new Bash on Windows install

$ touch ~/.bashrc
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
// restart bash
$ nvm install node
@markhker
markhker / Enhance.js
Created August 23, 2017 16:39 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@markhker
markhker / add_two_times.js
Created November 9, 2017 22:42 — forked from joseluisq/add_two_times.js
Sum two times values HH:mm:ss with javascript
/**
* Sum two times values HH:mm:ss with javascript
* Usage:
* > addTimes('04:20:10', '21:15:10');
* > "25:35:20"
*
* @param {string} start
* @param {string} end
* @returns {String}
*/