Skip to content

Instantly share code, notes, and snippets.

View kadikraman's full-sized avatar
💚

Kadi Kraman kadikraman

💚
View GitHub Profile
docker run -e "ACCEPT_EULA=true" -e "MSSQL_PID=Express" -e "SA_PASSWORD=suchpass123@" -p 1433:1433 microsoft/mssql-server-linux
kill $(ps aux | grep flow | grep -v grep | awk '{print $2}')

Keybase proof

I hereby claim:

  • I am kadikraman on github.
  • I am hellokadi (https://keybase.io/hellokadi) on keybase.
  • I have a public key ASDG7VvFroU2sJhdL6yt4kkk9EtOy4Q_FMzBXl3wKe5UbAo

To claim this, I am signing this object:

@kadikraman
kadikraman / package-json-version.bash
Created March 27, 2018 12:32
Get the package.json version from the terminal/bash
cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g'
@kadikraman
kadikraman / importAndExportFile.js
Created March 19, 2018 14:29
Import a file and immediately export
export { default as CircleAdd } from './icons/CircleAdd';
export { default as TagRemove } from './icons/TagRemove';
@kadikraman
kadikraman / requireBasedOnRegex.js
Last active June 22, 2017 10:01
(Webpack) require a bunch of files based on a regex
/*
Instead of
require('../../blah/stories.js');
require('../../blah/blah/stories.js');
...
*/
const req = require.context('../', true, /stories\.js$/);
function loadStories() {
@kadikraman
kadikraman / arrayCopyReplace.js
Created April 25, 2017 15:43
JavaScript tips
/*
Replacing an item in an array without mutating it
*/
const old = [1, 2, 3, 4];
const new = Object.assign([], old, {0: 1000});
console.log(new);
// [1000, 2, 3, 4]
/src
    /components
        /Component1
            index.js <— may be a pure component or a component wrapped in a container, the consumer doesn’t care anyway
            index.spec.js
        /Component2
        /Component3
    /reducers
        index.js
        /Reducer1
/src
    /components
        PureComponent1
            index.js
            index.spec.js
            style.css
        PureComponent2
            index.js
            index.spec.js
            style.css
/src
    /components
    /containers
    /actions
    /reducers
    /sagas