Skip to content

Instantly share code, notes, and snippets.

View devoto13's full-sized avatar

Yaroslav Admin devoto13

View GitHub Profile
[
{
"key": "alt+cmd+left",
"command": "workbench.action.navigateBack"
},
{
"key": "ctrl+-",
"command": "-workbench.action.navigateBack"
},
{
# ZSH history
HISTFILE=~/.zsh_history
HISTSIZE=999999999
SAVEHIST=$HISTSIZE
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
# NVM (must be loaded before OMZ as this snippet is fater then one used by nvm plugin)
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT='${ret_status} %{$fg[cyan]%}%~%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@devoto13
devoto13 / cleanup.js
Created September 14, 2020 13:48
Cleanup all job artifacts from GitLab
const fetch = require("node-fetch");
const domain = "YOUR-GITLAB-DOMAIN";
const token = "YOUR-TOKEN";
const forEachPage = async (url, callback) => {
const res = await fetch(url, { headers: { "PRIVATE-TOKEN": token } });
const data = await res.json();
const total = res.headers.get("x-total");
$ make test
make lint && \
(. .venv/bin/activate; DEBUG= PYTHONPATH=`pwd` nosetests --with-coverage --logging-level=WARNING --nocapture --no-skip --exe --cover-erase --cover-tests --cover-inclusive --cover-package=localstack --with-xunit --exclude='.venv.*' --ignore-files='lambda_python3.py' .)
(. .venv/bin/activate; flake8 --inline-quotes=single --show-source --max-line-length=120 --ignore=E128,W504 --exclude=node_modules,.venv*,dist .)
Starting mock SES (http port 4579)...
Starting mock CloudWatch Logs (http port 4586)...
Starting mock Redshift (http port 4577)...
Starting mock CloudFormation (http port 4581)...
Starting mock Firehose service (http port 4573)...
* Serving Flask app "firehose_api" (lazy loading)
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
@devoto13
devoto13 / index.es.js
Last active May 26, 2018 15:43
Example of `index.es.js` from `@fortawesome/pro-regular-svg-icons` using re-exports.
/*!
* Font Awesome Pro 5.1.0-11 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
import { faAddressBook } from './faAddressBook';
import { faAddressCard } from './faAddressCard';
import { faAdjust } from './faAdjust';
import { faAlarmClock } from './faAlarmClock';
import { faAlignCenter } from './faAlignCenter';
import { faAlignJustify } from './faAlignJustify';
@devoto13
devoto13 / custom-event-manager.ts
Created January 20, 2018 10:36
EventManager, which allows to subscribe to any event outside of NgZone, so event won't trigger change detection
/**
* Custom event manager, which allows to add event listeners outside of Angular
* zone.
*
* See https://stackoverflow.com/a/45229997/1377864 for original idea
*/
@Injectable()
export class CustomEventManager extends EventManager {
addGlobalEventListener(target: string, eventName: string, handler: Function): Function {
if (eventName.endsWith(NO_ZONE)) {
$ yarn list
yarn list v1.1.0
├─ @types/fs-extra@4.0.2
│ └─ @types/node@*
├─ @types/glob@5.0.32
│ ├─ @types/minimatch@*
│ ├─ @types/minimatch@3.0.1
│ └─ @types/node@*
├─ @types/handlebars@4.0.36
├─ @types/highlight.js@9.1.10
@devoto13
devoto13 / devoto13.xml
Last active March 29, 2017 22:09
Style for GTKSourceView 3 similar to light theme of WebStorm
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2006-2007 GtkSourceView team
Author: Yevgen Muntyan <muntyan@tamu.edu>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public