Skip to content

Instantly share code, notes, and snippets.

View listochkin's full-sized avatar

Андрей Листочкин (Andrei Listochkin) listochkin

View GitHub Profile
@listochkin
listochkin / domain.js
Last active December 21, 2015 15:29 — forked from iliakan/domain.js
var domain = require('domain');
var mysql = require('mysql');
var pool = mysql.createPool({
host: '127.0.0.1',
port: 3306,
database: 'test',
user: 'localuser',
password: 'localpass',
});

Установка Node и NPM

Для воркшопа nodeschool необходимо установить платформу node.js и пакетный менеджер npm.

для Windows, MacOS самый простой способ установки через официальный сайт в автоматическом режиме, нажав на кнопку Install.

для Linux/Unix систем самый надежный способ через командную строку, использую подходы:

@listochkin
listochkin / barinfuck.lol
Last active October 16, 2023 18:02 — forked from DrAzraelTod/gist:1710332
Brainfuck interpreter in Lolcode
HAI
BTW This is a BrainFuck interpreter written in LOLCode
BTW It accepts as input a BF program, followed by a "!", followed by any input to the BF program.
BTW Since BrainFuck is turing-complete, this proves that LOLCode is too
I HAS A INSTRUCTIONS BTW Array for BF instructions
I HAS A IPTR BTW Pointer to first empty element in INSTRUCTIONS
IPTR R 0
I HAS A LOOPZ BTW Array of loop start/end addresses
I HAS A LOOPSTACKZ BTW Loop stack for building the above two
@listochkin
listochkin / README.md
Last active May 31, 2016 22:45 — forked from thequux/README.md
Multirust-compatible racer wrapper with OS X support

This wrapper automatically sets the RUST_SRC_DIRECTORY environment variable for whatever rust compiler is currently active, automatically creating a new checkout whenever necessary. This should be compatible with all of the multirust-alike tools, but it has only been tested with rustup.rs

Installation

Simply place this somewhere on your path before the main racer binary and set the execute bit.

Uninstallation

@listochkin
listochkin / README.md
Created July 9, 2018 12:24 — forked from andyshinn/README.md
pbcopy over SSH

Install

  • Add pbcopy.plist to your ~/Library/LaunchAgents/ folder.
  • Launch the listener with launchctl load ~/Library/LaunchAgents/pbcopy.plist.
  • Add RemoteForward 2224 127.0.0.1:2224 in your ~/.ssh/config file under your Host * or specific hosts sections.
  • Add [ -n "$SSH_CLIENT" ] && alias pbcopy="nc localhost 2224" to your remote ~/.bash_profile or other shell profile.
  • Enjoy pbcopy remotely!
@listochkin
listochkin / 2018.js
Last active March 24, 2022 03:15 — forked from Jack-Works/2018.js
cRAzY eSnEXt (*all* proposals mixed in)
#! Aaaaaaaaaaa this is JS!!!
// https://github.com/tc39/proposal-hashbang
// This file is mixing all new syntaxes in the proposal in one file without considering syntax conflict or correct runtime semantics
// Enjoy!!!
// Created at Nov 23, 2018
for await(const x of (new A // https://github.com/tc39/proposal-pipeline-operator
|> do { // https://github.com/tc39/proposal-do-expressions
case(?) { // https://github.com/tc39/proposal-pattern-matching
when {val}: class {