Skip to content

Instantly share code, notes, and snippets.

Angel Grablev agrublev

Block or report user

Report or block agrublev

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 as.js
const arr1 = [1, 2, 3, 4, 5];
if (arr1.indexOf(1) !== -1) {
console.log("Arr1 HAS the integer 1!");
if (arr1.includes(1)) {
console.log("Arr1 HAS the integer 1!");
agrublev /
Created Jun 4, 2019
Clean all node modules
find . -name "node_modules" -exec rm -rf '{}' +
agrublev / RECURS_OBJECTS.js
Last active Apr 23, 2019
Recursive object manipulation
const iterateObject = (obj, executeOnValue) => {
Object.keys(obj).forEach(name=> {
let val = obj[name];
if (typeof val === "object") {
return iterateObject(val, executeOnValue);
} else if (val === undefined) {
obj[name] = "";
} else {
obj[name] = executeOnValue(val);
View blueprint
import "@blueprintjs/icons/lib/css/blueprint-icons.css";
import "@blueprintjs/core/lib/css/blueprint.css";
View .eslintrc.js
module.exports = {
plugins: ["react","markdown"],
globals: {
importScripts: true
env: {
browser: true,
node: true,
es6: true

The simplest way to run your npm type tasks

You write a beautiful & documented Markdown file, we run it for you. And you have a lot of flexibility!

Example file

Or if you want to ensure that your teammates are using the same version as you, it's recommended to install Maid locally:

# For npm users
npm i -D maid
agrublev /
Last active Mar 3, 2019
How to add PhpStorm or WebStorm to Code Story

Getting PhpStorm to auto open file/line with Code Story


  1. Go to PhpStorm/WebStorm and under Tools get the path to cmd launcher Get the path of app
  2. It will look like this /usr/local/bin/pstorm Path
  3. Now go to Code Story and in the menu click Preferences
agrublev / index.js
Created Jan 25, 2019 — forked from zkat/index.js
npx is cool
View index.js
#!/usr/bin/env node
console.log('yay gist')
agrublev / parse_dotenv.bash
Created Dec 20, 2018 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
View parse_dotenv.bash
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
You can’t perform that action at this time.