Skip to content

Instantly share code, notes, and snippets.

View kateliev's full-sized avatar
🧲
Working, working, working...

Vassil Kateliev kateliev

🧲
Working, working, working...
View GitHub Profile
@halcarleton
halcarleton / SublimeText-Project-Line-Count
Last active August 6, 2023 16:09 — forked from Hexodus/count_total_project_code_lines_in_sublime
Count total lines of code in a Sublime Text Project or Directory
Go to menu:
Find -> Find in Files... (windows: ctrl+shift+f)
Switch on reg_ex button (windows: alt+r)
Find:
^.*\S+.*$
Where:
c:\your_folder\,*.php,*.js,*.inc,*.html,*.htm,*.scss, -*/folder_to_exclude/*, -*.min.js
@sayedihashimi
sayedihashimi / resolve-fullpath.ps1
Created August 5, 2014 09:11
PowerShell how to convert a relative path to a full path
# based off of http://mnaoumov.wordpress.com/2013/08/21/powershell-resolve-path-safe/
function Resolve-FullPath{
[cmdletbinding()]
param
(
[Parameter(
Mandatory=$true,
Position=0,
ValueFromPipeline=$true)]
[string] $path
@wynnzen
wynnzen / repl_shortcut
Last active September 20, 2023 09:20
sublime repl shortcut setting
[
{"keys":["f5"],
"caption": "SublimeREPL: Python - RUN current file",
"command": "run_existing_window_command",
"args":
{
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}},
{"keys":["f4"],
@cchamberlain
cchamberlain / rdiff.ps1
Last active June 21, 2024 01:49
Recursively diffs 2 directories (files and contents) using MD5 hashes - Includes validation for paths and optional summary export. Requires PowerShell 3.0 or later.
#########################################################################
### USAGE: rdiff path/to/left,path/to/right [-s path/to/summary/dir] ###
### ADD LOCATION OF THIS SCRIPT TO PATH ###
#########################################################################
[CmdletBinding()]
param (
[parameter(HelpMessage="Stores the execution working directory.")]
[string]$ExecutionDirectory=$PWD,
[parameter(Position=0,HelpMessage="Compare two directories recursively for differences.")]
@w495
w495 / sliding_window.py
Last active January 20, 2021 18:19
Sliding window as deque. Yet another implementation of sliding (rolling) window iterator in Python. This is based on answers of http://stackoverflow.com/questions/6822725/rolling-or-sliding-window-iterator-in-python. It is improved with "overlapping" and two window types: soft and strict.
# -*- coding: utf8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import collections
import types
import itertools
class SlidingWindow(collections.deque):
@staypufd
staypufd / .lisp
Created February 5, 2016 04:10
Example of using SPLIT-SEQUENCE from cl-utilities package for Common Lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 1. Example of using quicklisp to laod in
;;; cl-utilities and use one function
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Load in the cl-utilities package
(ql:quickload "cl-utilities")
;;; Tell the cl-user namespace to use the cl-utilities package
@maksymx
maksymx / PASCAL.sublime-build
Last active August 8, 2023 14:21
Sublime Text build system for Pascal project
{
"cmd": ["fpcbuild.bat", "$file"], "quiet": true
}
@henfiber
henfiber / KB-Buying-guide-EU.md
Last active June 4, 2024 08:55
Buying keyboards and keyboard components from EU

Europe

  • SkinFlint : Price comparison site which has some nice filtering options per switch type etc. Searches for offers in UK, Germany, Poland and Austria
  • mykeyboard.eu : Keyboards, keycaps and accessories. Based in Belgium.
  • candykeys.com : European Store selling Vortex, Leopold, KBP, Anne Pro keyboards, keycap sets and components (ISO + ANSI). Based in Germany, ships to EU.
  • falba.tech : custom wooden bamboo cases, and some acrylic and carbon ones. Switch packs (65 browns at 48EUR). Other parts for the GH60, Atreus, ErgoDox. Also Microcontrollers, diodes, leds etc.
  • 42keebs.eu - Mostly PCBs, tools and accessories. Located in Czech Republic.
  • KEYGEM : Switches, Keycaps, lubes, cables, DIY kits and deskmats. Based in Germany, ships to the EU and worldwide.
  • [Eloquent Clicks - Custom Mechanical Keyboard Store](https://www.eloquen
@transitive-bullshit
transitive-bullshit / embed-animated-svg.html
Created March 7, 2018 22:38
Embed animated svg in GitHub-flavored Markdown Example
<p align="center">
<img width="600" src="https://cdn.rawgit.com/transitive-bullshit/create-react-library/master/media/demo.svg">
</p>
import collections
import io
import itertools
import logging
import os
import sys
from pathlib import Path
from pprint import pprint
from typing import Dict, List, Tuple