Skip to content

Instantly share code, notes, and snippets.

View ricca509's full-sized avatar

Riccardo Coppola ricca509

View GitHub Profile
@ricca509
ricca509 / GitHub-Forking.md
Created September 26, 2016 09:43 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, when I started going through the process of forking and issuing pull requests, I had some trouble figuring out the proper method for doing so and made quite a few mistakes along the way. I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your

@ricca509
ricca509 / index.spec.js
Created August 31, 2016 21:17
WebdriverIO test example
var assert = require('assert');
describe('webdriver.io page', function() {
it('should have the right title', function () {
browser.url('http://webdriver.io');
var title = browser.getTitle();
assert.equal(title, 'WebdriverIO - Selenium 2.0 javascript bindings for nodejs');
});
});
@ricca509
ricca509 / docker-compose.yml
Last active September 1, 2016 09:09
WebdriverIO example docker-compose
app:
build: .
command: npm test -- --host selenium
links:
- selenium
selenium:
image: selenium/standalone-chrome
expose:
- "4444"
@ricca509
ricca509 / Dockerfile
Last active August 31, 2016 21:17
Containerize Selenium tests
FROM node:6
ADD . /app
WORKDIR /app
RUN npm i
// math.js
export function sum(a, b) {
return a + b;
}
export default function sub(a, b) {
return a - b;
}
// main.js
import React from 'react';
import { shallow } from 'enzyme';
import proxyquire from 'proxyquire';
proxyquire.noCallThru();
const Header = () => <div></div>; // stub component
const Sidebar = () => <div></div>; // stub component
const Footer = () => <div></div>; // stub component
const Oops = () => <div></div>; // stub component
import React from 'react';
import { shallow } from 'enzyme';
import HomePage from '../components/HomePage';
import Header from '../components/Header';
import Sidebar from '../components/Sidebar';
import Footer from '../components/Footer';
import { Oops } from '../components/Oops';
describe('The HomePage component', function () {
describe('when there is no error', function () {
import React from 'react';
import Header from './Header';
import Sidebar from './Sidebar';
import Footer from './Footer';
import { Oops } from './Oops'; // Importing a non-default export
export default function HomePage({ data, error }) {
let component = (
<div>
<Header links={data.headerLinks} />
@ricca509
ricca509 / chrome-web-security.sh
Last active August 10, 2023 08:25
Chrome: Disable web security [OSX]
// OSX
open -na Google\ Chrome --args --disable-web-security --user-data-dir="/tmp/chrome_dev"
@ricca509
ricca509 / chrome-web-security.bat
Last active March 30, 2016 16:08
Chrome: Disable web security [Win]
REM Windows
start chrome --disable-web-security --user-data-dir="C:/temp/chrome_dev"