Skip to content

Instantly share code, notes, and snippets.

Alex veirus

Block or report user

Report or block veirus

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
ramil-k / i.js
Created Jun 22, 2018
iterators to generators
View i.js
const movies = {
action: ['dark', 'aveng'],
comedy: ['life', 'lights'],
[Symbol.iterator]*() {
for (let movies of Object.values(this)) {
// option 1:
for (let movie of movies) {
yield movie;
// option 2 (see* for details):
jeremiegirault /
Last active May 15, 2019
Use inline SVG in vue.js

Install svg-inline-loader for webpack :

npm install svg-inline-loader --save-dev

Add it to your loaders in module.loaders section of webpack.config.js:

  test: /\.svg$/,
  loader: 'svg-inline-loader'
myshov / function_invocation.js
Last active Jul 8, 2019
11 Ways to Invoke a Function
View function_invocation.js
(_ => console.log(2))();
eval('console.log(3);');, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);, null, [9]);, null, 10);
lleaff / Discord_-_Open_chat_in_popup.user.js
Last active Jun 10, 2019
Adds a "open in popup" button to channels
View Discord_-_Open_chat_in_popup.user.js
// ==UserScript==
// @name Discord - Open chat in popup
// @namespace lleaff
// @updateURL
// @supportURL
// @match*
// @version 1
// @run-at document-end
// @grant none
// @noframes
nkbt / .eslintrc.js
Last active Sep 19, 2019
Strict ESLint config for React, ES6 (based on Airbnb Code style)
View .eslintrc.js
"env": {
"browser": true,
"node": true,
"es6": true
"plugins": ["react"],
"ecmaFeatures": {
praveenvijayan / Copy text directly from Photoshop text layer.
Last active Oct 4, 2018
Copy text directly from text layer. Works above photoshop cs6. Copy following script file into /Applications/Adobe Photoshop CC 2014/Presets/Scripts (MAC) or C:\Program Files\Adobe\Adobe Photoshop CC 2014\Presets\Scripts (WIN). Assign shortcut for easy access (cmd+option+c / ctrl+alt+c)
View Copy text directly from Photoshop text layer.
* Copy Layer text 1.0 - by Praveen Vijayan! -
* Compatibility above Photoshop CS6
* Licensed under the Creative Commons Attribution 2.5 License -
View console.log.vim
" Console log from insert mode; Puts focus inside parentheses
imap cll console.log();<Esc>==f(a
" Console log from visual mode on next line, puts visual selection inside parentheses
vmap cll yocll<Esc>p
" Console log from normal mode, inserted on next line with word your on inside parentheses
nmap cll yiwocll<Esc>p
You can’t perform that action at this time.