Skip to content

Instantly share code, notes, and snippets.

View m3xan1k's full-sized avatar
💭
coding

Sergey Shevtsov m3xan1k

💭
coding
View GitHub Profile
# -*- coding: utf-8 -*-
"""Demonstrate high quality docstrings.
Module-level docstrings appear as the first "statement" in a module. Remember,
that while strings are regular Python statements, comments are not, so an
inline comment may precede the module-level docstring.
After importing a module, you can access this special string object through the
``__doc__`` attribute; yes, it's actually available as a runtime attribute,
despite not being given an explicit name! The ``__doc__`` attribute is also
@m3xan1k
m3xan1k / 00_destructuring.md
Created August 26, 2023 07:09 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

VimWiki Cheatsheet

[number] refers to the wiki number, set by the order in your vimrc. The default is 1.

Wiki Management

  • [number] <leader> ww - open wiki index file
  • [number] <leader> wt - open wiki index file in new tab
  • <leader> ws - list and select available wikis
  • wd - delete wiki page
@m3xan1k
m3xan1k / c_pthread_shared_variable_example.c
Created May 31, 2023 20:10 — forked from gustavorv86/c_pthread_shared_variable_example.c
Shared a global variable into multiple threads.
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
typedef struct {
pthread_t thread;
int id_thread;
long sec_usleep;
} thread_info_t;
@m3xan1k
m3xan1k / gulpfile.js
Created July 23, 2021 07:29 — forked from soin08/gulpfile.js
Gulpfile.js to use with Django projects. Based on gulpfile.js from Google Web Starter Kit.
//Based on gulpfile.js from Google Web Starter Kit.
//https://github.com/google/web-starter-kit
'use strict';
// Include Gulp & Tools We'll Use
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');
var runSequence = require('run-sequence');
var browserSync = require('browser-sync');
@m3xan1k
m3xan1k / gulpfile.js
Created July 21, 2021 19:25 — forked from atelic/gulpfile.js
Basic gulpfile for minify and concat css and javascript
/*
Before using make sure you have:
npm install --save-dev gulp gulp-minify-css gulp-concat gulp-uglify gulp-autoprefixer gulp-sass
Make sure to change the directory names in the default watch function to the CSS/SCSS/SASS directories you are using so it reloads
*/
var gulp = require('gulp'),
minifyCSS = require('gulp-minify-css'),
concat = require('gulp-concat')
@m3xan1k
m3xan1k / .vimrc
Created May 18, 2020 07:30
.vimrc linux edition
let fancy_symbols_enabled = 0
set encoding=utf-8
let using_neovim = has('nvim')
let using_vim = !using_neovim
" ============================================================================
" Vim-plug initialization
" Avoid modifying this section, unless you are very sure of what you are doing
@m3xan1k
m3xan1k / vscode_shortcuts.md
Created November 9, 2019 18:30 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@m3xan1k
m3xan1k / python-es6-comparison.md
Created June 5, 2019 09:18 — forked from revolunet/python-es6-comparison.md
# Python VS ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math