Skip to content

Instantly share code, notes, and snippets.

George Stefanis skywritergr

Block or report user

Report or block skywritergr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9b01c407791154ef7a25cc00f2f213d5
import 'awesome-transferwise-library';
import 'bootstrap/dist/js/bootstrap';
import 'bootstrap/dist/css/bootstrap.css';
View gist:749c75a6c864b9d31e811952f2990241
// ...
externals: {
moment: 'moment'
// ...
skywritergr / webpack.conf.js
Last active Feb 24, 2018
View webpack.conf.js
var Visualizer = require('webpack-visualizer-plugin');
plugins: [new Visualizer()],
View Dockerfile_ibm_driver
FROM node:4.3.1-wheezy
# Install app dependencies
COPY package.json /src/package.json
RUN cd /src; npm install --production
# Bundle app source
COPY . /src
CMD ["node", "/src/server.js"]
View webpack.config.js
var webpack = require('webpack');
module.exports = {
entry: './public/js/render.jsx',
output: {
// Output the bundled file.
path: './public/build',
// Use the name specified in the entry key as name for the bundle file.
filename: 'bundle.js'
View react-tutorial-browserify.js
var gulp = require('gulp');
var source = require('vinyl-source-stream'); // Used to stream bundle for further handling
var browserify = require('browserify');
var watchify = require('watchify');
var reactify = require('reactify');
var concat = require('gulp-concat');
gulp.task('browserify', function() {
var bundler = browserify({
entries: ['./public/js/render.jsx'], // Only need initial file, browserify finds the deps
View react-tutorial-gulpfile.js
var gulp = require('gulp'),
requireDir = require('require-dir');
gulp.task('default', ['browserify']);
View react-tutorial-Index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>React Tutorial</title>
<!-- Not present in the tutorial. Just for basic styling. -->
<link rel="stylesheet" href="css/base.css" />
<script src=""></script>
<script src=""></script>
<script src=""></script>
View complicatedObject.json
"id": 123,
"name": "Awesome TV series",
"watched": false,
"children": [
"id": 4324,
"name": "Season 1",
"watched": false,
"children": [
View recursiveFunction.js
var recursivelyToggle = function recursivelyToggleChildren(array){
var localArray = array;
for(var i=0;i<localArray.length;i++){
var node = localArray[i];
toggleFlag(node); // toggles the flag of the node.
node.children = recursivelyToggleChildren(node.children);
You can’t perform that action at this time.