Skip to content

Instantly share code, notes, and snippets.

@saidimu
saidimu / update-centos-7.sh
Created April 28, 2017 19:14 — forked from jbeda/update-centos-7.sh
Install prev kubeadm versions
kubeadm init --use-kubernetes-version=v1.5.6
@saidimu
saidimu / update-centos-7.sh
Created April 28, 2017 19:14 — forked from jbeda/update-centos-7.sh
Install prev kubeadm versions
kubeadm init --use-kubernetes-version=v1.5.6
@saidimu
saidimu / Redirect.jsx
Created August 26, 2015 17:19
A ReactJS redirect component for STML/react-router-component
// jshint unused:true
var React = require('react');
var NavigatableMixin = require('react-router-component').NavigatableMixin;
var Redirect = React.createClass({
mixins: [NavigatableMixin],
_redirect: function(url) {
this.navigate(url);
@saidimu
saidimu / falcorApp.jsx
Last active August 26, 2015 03:07 — forked from btholt/falcorApp.jsx
Falcor + React
const React = require('react');
const _ = require('lodash');
var model = new falcor.Model({
cache: {
movies: [
{
title: "Daredevil",
plot: "Marvel lol",
year: "2015-",
var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}
// Reloading modules from the repl in Node.js
// Benjamin Gleitzman (gleitz@mit.edu)
//
// Inspired by Ben Barkay
// http://stackoverflow.com/a/14801711/305414
//
// Usage: `node reload.js`
// You can load the module as usual
// var mymodule = require('./mymodule')
// And the reload it when needed
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true

Docker Cheat Sheet

Why

Why Should I Care (For Developers)

"Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple."

TL;DR, I just want a dev environment

#!/usr/bin/env node
var cordova_util = require('cordova/src/util');
var projectRoot = cordova_util.isCordova(process.cwd());
var projectXml = cordova_util.projectConfig(projectRoot);
var projectConfig = new cordova_util.config_parser(projectXml);
projectConfig.name();
var fs = require ('fs');