A timeline of the last four years of detecting good old window.localStorage
.
October 2009: 5059daa
/** | |
* Module dependencies. | |
*/ | |
var express = require('express'); | |
var app = module.exports = express.createServer(); | |
// Configuration |
A timeline of the last four years of detecting good old window.localStorage
.
October 2009: 5059daa
/* MIXINs */ | |
@mixin transition( $val : ease 0.5s ) { | |
-webkit-transition: $val; | |
-moz-transition:$val; | |
-o-transition:$val; | |
-ms-transition:$val; | |
transition:$val; | |
} | |
@mixin text-shadow( $top: 3px, $left: 3px, $blur: 3px , $colour: #333 ) { |
// Browser Prefixes | |
@mixin transform($transforms) { | |
-webkit-transform: $transforms; | |
-moz-transform: $transforms; | |
-ms-transform: $transforms; | |
transform: $transforms; | |
} | |
// Rotate | |
@mixin rotate ($deg) { |
You can run your Express app very easily inside your Electron app.
All you need to do is to:
your_electron_app\resources\app
app.js
file/* | |
https://gist.github.com/bek9/10b55a369e8d190e2209 | |
reference: http://brandcolors.net/ | |
*/ | |
.fa-500px.fa-colored { color: #0099e5; } | |
.fa-amazon.fa-colored { color: #ff9900; } | |
.fa-android.fa-colored { color: #a4c639; } | |
.fa-apple.fa-colored { color: #000; } | |
.fa-bitbucket.fa-colored, .fa-bitbucket-square.fa-colored { color: #205081; } |
import { join } from 'path' | |
import { readdir, stat } from 'fs-promise' | |
async function rreaddir (dir, allFiles = []) { | |
const files = (await readdir(dir)).map(f => join(dir, f)) | |
allFiles.push(...files) | |
await Promise.all(files.map(async f => ( | |
(await stat(f)).isDirectory() && rreaddir(f, allFiles) | |
))) | |
return allFiles |
import React, { Component } from 'react'; | |
import ReactDOM from 'react-dom'; | |
/** | |
* Use case: audio player with dynamic source in react | |
* | |
* Usage: | |
* <AudioPlayerDOM src={this.state.currentFile}/> | |
* | |
* Todo: make a better api, actually pass props through | |
* Todo: use children instead of passing |
/* MIXINS ___________________________________________*/ | |
// Transitions | |
@mixin transition($transition-property, $transition-time, $method) { | |
-webkit-transition: $transition-property $transition-time $method; | |
-moz-transition: $transition-property $transition-time $method; | |
-ms-transition: $transition-property $transition-time $method; | |
transition: $transition-property $transition-time $method; | |
} |
const nodemailer = require('nodemailer'); | |
// const env = process.env.NODE_ENV || 'development'; | |
// const config = require(path.join(__dirname, '/../config/config.json'))[env]; | |
module.exports = (data) => { | |
nodemailer.createTestAccount((err, account) => { | |
// create reusable transporter object using the default SMTP transport | |
let transporter = nodemailer.createTransport({ | |
host: 'smtp.gmail.com', | |
port: 587, |