Skip to content

Instantly share code, notes, and snippets.

View geoJson.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View components.my-component.js
import Ember from 'ember';
import _ from "lodash";
const { computed, get, set } = Ember;
export default Ember.Component.extend({
items: [],
allItems: computed.alias('items'),
selectedItems: [],
@kevingelion
kevingelion / components.my-component.js
Created Jul 25, 2017 — forked from farisj/components.my-component.js
Indeterminate/Checked Inputs in Ember
View components.my-component.js
import Ember from 'ember';
import _ from "lodash";
const { computed, get, set } = Ember;
export default Ember.Component.extend({
items: [],
allItems: computed.alias('items'),
selectedItems: [],
@kevingelion
kevingelion / .travis.yml
Last active Jun 28, 2017
Ember Electron Configs
View .travis.yml
sudo: required
dist: trusty
language: node_js
osx_image: xcode8.3
group: deprecated-2017Q2
matrix:
include:
- os: linux
node_js: 6
addons:
View cam.js
getYourCards(numbersOnly) {
fs.createReadStream(this.imagePath).pipe(new PNG({
filterType: -1
})).on("parsed", function() {
let yourCardsSuit = [];
console.log("Array created");
console.log("Entered read stream");
// Loop through each vertical pixel of the image
for (var y = 0; y < this.height; y++) {
// Loop through each horizontal pixel of the image
@kevingelion
kevingelion / hyper.js
Created Mar 3, 2017
Hyper Config Current
View hyper.js
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
View updater.js
const {app, autoUpdater, dialog} = require('electron');
const ms = require('ms');
const platform = process.platform === 'darwin' ? 'osx' : process.platform;
const version = app.getVersion();
const feedUrl = `https://my-updates-here.herokuapp.com/update/${platform}`;
export default class AutoUpdater {
constructor(mainWindow) {
View updater
const {app, autoUpdater, ipcMain, ipcRenderer} = require('electron');
const ms = require('ms');
const platform = process.platform === 'darwin' ? 'osx' : process.platform;
const version = app.getVersion();
const feedUrl = `https://my-updates-here.herokuapp.com/update/${platform}`;
export default class Updater {
static remoteQuitAndInstall() {
ipcRenderer.send('quitAndInstall');
View RGBW Node Conversion
const chroma = require('chroma-js');
var Q = 255;
var color = chroma("#FF0000").rgb();
var max = Math.max.apply(null, color);
var min = Math.min.apply(null, color);
var K;
var Wo = (min/max < 0.5) ? ((min*max) / (max-min)) : (max);
if(color[0] == color[1] && color[0] == color[2] && color[0] != null) {