Skip to content

Instantly share code, notes, and snippets.

View kevinfiol's full-sized avatar
🌔
man on the moon

kevinfiol

🌔
man on the moon
View GitHub Profile
@kevinfiol
kevinfiol / multi-git.md
Created December 22, 2015 18:25 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.

@kevinfiol
kevinfiol / .htaccess
Last active November 21, 2017 18:39
paths
<IfModule mod_rewrite.c>
RewriteEngine On
# Client Reroutes
RewriteBase /web/
RewriteRule ^web\/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php [L]
function bigBoySort(arr) {
if (arr.length < 2) {
return arr;
}
let p = arr[0];
let lo = [];
let hi = [];
for (let i = 1; i < arr.length; i++) {
@kevinfiol
kevinfiol / flatten.php
Last active March 30, 2018 14:23
Flatten Multi-Dimensional PHP Arrays
<?php
function flatten($arr, $keys = []) {
$res = [];
foreach ($arr as $key => $val) {
$keys[] = strval($key);
if (is_array($val)) {
$res = array_merge($res, flatten($val, $keys));
@kevinfiol
kevinfiol / rollup.config.js
Created July 23, 2018 14:23
multiple files rollup config
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import buble from 'rollup-plugin-buble';
import uglify from 'rollup-plugin-uglify';
import json from 'rollup-plugin-json';
const paths = [
['client/components/SearchComponent.js', 'web/js/components/SearchComponent.js']
];
@kevinfiol
kevinfiol / error.log
Created January 17, 2019 16:43
react/rollup/buble
λ yarn run start
yarn run v1.12.3
$ rollup -c -w --environment DEV
rollup v1.1.0
bundles ./src/index.js → public\app.js...
[!] (commonjs plugin) SyntaxError: Unexpected token (2821:19) in C:\.dev\js\.react\dota\node_modules\react-dom\cjs\react-dom.development.js
node_modules\react-dom\cjs\react-dom.development.js (2821:19)
2819: // on the client side because the browsers are inconsistent. Instead we call focus().
2820: 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless',
2821: // Microdata
const a = {
foo: 2
};
function say() {
console.log(this.foo);
}
const dontSay = () => console.log(this.foo);
const sayHi = () => {
console.log(hi());
};
const hi = () => {
return 'hi';
};
sayHi();