Skip to content

Instantly share code, notes, and snippets.

@z81
z81 / cell0.js
Last active April 15, 2022 14:32
untitled
const map = (arr, cb) => {
const res = [];
for(let v of arr) {
res.push(cb(v));
}
return res;
};

Smiley Face

@z81
z81 / custom.css
Last active November 18, 2020 10:02
vs code multiline tabs
.tabs-and-actions-container > .monaco-scrollable-element {
height: auto !important;
}
.tabs-and-actions-container > .monaco-scrollable-element > .tabs-container {
height: auto !important;
flex-wrap: wrap;
}
.monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab {
@z81
z81 / main.go
Created December 31, 2018 02:11
package main
import (
"database/sql"
"fmt"
"log"
"math"
"runtime"
"sync"
"time"
@powershell -NoProfile -ExecutionPolicy Bypass -File "install.ps1"
pause
@z81
z81 / kazaj.js
Created February 22, 2018 10:33
kazaj.js
//==============================================================================
var functions = {},
benchmark,
errors = {
network: 'Ошибка связи, сервер не доступен.'
};
//Ошибка
function error(text)
@z81
z81 / mapgen.js
Created November 30, 2017 11:35
best ne govnokod mapgen.js
const textures = {
none: "░░",
road: "██",
user: "*/"
};
const mapSize = 30;
const locations = [
{
name: "Глеdvбоиния"
@z81
z81 / .neutrinorc.js
Created August 7, 2017 15:58
My neutrinojs confi, neutrino 6.1.5, scss, es6 decorators, class-properties, react
const path = require('path');
const HtmlPlugin = require('html-webpack-plugin');
const loaderMerge = require('neutrino-middleware-loader-merge');
const SRC = path.join(process.cwd(), 'src');
module.exports = {
use: [
"neutrino-preset-react",
({ config, use }) => {
import io from 'socket.io-client';
import { parse } from 'graphql';
let socket = null;
let queryId = 0;
const queryResolvers = new Map();
const queryInstancesCache = new Map();
const fragmentsCache = new Map();
const QueryStatus = {
PENDING: 1,
@z81
z81 / CertificateGeneration.sh
Created March 18, 2017 15:43 — forked from sandfox/CertificateGeneration.sh
TLS certificate inspection example (using nodejs)
###
#Step 1 - Generate server certificates etc... (most of this code is horribly ripped off from nodejs docs currently -> http://nodejs.org/docs/latest/api/tls.html)
###
#Assuming your starting from a clean directory
mkdir server
cd server
#generate private key