Skip to content

Instantly share code, notes, and snippets.


Bartek Kus bartekus

View GitHub Profile
bartekus / build.js
Last active Apr 3, 2020
Browser Extension ready react-scripts
View build.js
// @remove-on-eject-begin
* Copyright (c) 2015-present, Facebook, Inc.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
// @remove-on-eject-end
'use strict';
bartekus / react-scripts+3.4.1.patch
Created Apr 3, 2020
Patch for react-scripts to enable browser extension development using create-react-app
View react-scripts+3.4.1.patch
diff --git a/node_modules/react-scripts/config/paths.js b/node_modules/react-scripts/config/paths.js
index 11d81b7..f095618 100644
--- a/node_modules/react-scripts/config/paths.js
+++ b/node_modules/react-scripts/config/paths.js
@@ -63,7 +63,11 @@ module.exports = {
appBuild: resolveApp('build'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
+ appBackgroundHtml: resolveApp('public/background.html'),
+ appOptionsHtml: resolveApp('public/options.html'),
bartekus / hosts
Last active Oct 9, 2018 — forked from consti/hosts
/etc/hosts to block shock sites etc.
View hosts
# This hosts file is brought to you by Dan Pollock and can be found at
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost> localhost localhost.localdomain broadcasthost
::1 localhost
bartekus / webpack.config.base.js
Last active Jan 8, 2017
Webpack-Config + Webpack Validation
View webpack.config.base.js
'use strict'; // eslint-disable-line strict
/* eslint no-unused-vars: 0 */
const fs = require('fs');
const { resolve } = require('path');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const WebpackToolsPlugin = require('webpack-isomorphic-tools/plugin');
bartekus / base_controller.rb
Last active Aug 29, 2015 — forked from dhoelzgen/base_controller.rb
CORS in Rails 4 APIs
View base_controller.rb
class API::V1::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS'
bartekus /
Last active Aug 29, 2015 — forked from monicao/
Setting up your own Ruby Dev Environment on a Mac

Setting up the Ruby dev environment on Mavericks

... should work on Yosemite as well. Add a comment here if you find any problems.

Why would I want to do that?

  • You want to run guard
  • You want use Sublime plugins (like RSpec or Guard plugins)

1. Installing brew