Skip to content

Instantly share code, notes, and snippets.

@wsdjeg
wsdjeg / git-tag-delete-local-and-remote.sh
Created May 4, 2022 05:08 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName

Here I will list all incompatibilities between old and new VimL implementations. Some may be fixed, so it is also a place for discussion. Please discuss incompatibilities with separate issues in separate issues.

Expressions parser incompatibilities

  • Dot subscripts are not always read correctly (#240).
  • E15 errors are not not just “E15: Invalid expression”: there are (invalid expressions)
  • “E15: expected variable name” (\x80\xFD\x52)
@wsdjeg
wsdjeg / os_name.lua
Created August 13, 2021 12:09 — forked from soulik/os_name.lua
OS type and CPU architecture detection in Lua language
local function getOS()
local raw_os_name, raw_arch_name = '', ''
-- LuaJIT shortcut
if jit and jit.os and jit.arch then
raw_os_name = jit.os
raw_arch_name = jit.arch
else
-- is popen supported?
local popen_status, popen_result = pcall(io.popen, "")
local Spring = {} do
Spring.__index = Spring
local pi = math.pi
local exp = math.exp
local sin = math.sin
local cos = math.cos
local sqrt = math.sqrt
function Spring.new(dampingRatio, frequency, position)
@wsdjeg
wsdjeg / repl.php
Created May 10, 2019 01:43 — forked from ziadoz/repl.php
Simple PHP REPL
#!/usr/bin/env php
<?php
if (php_sapi_name() !== 'cli') {
exit(1);
}
function input() {
return fgets(STDIN);
}
@wsdjeg
wsdjeg / gist:5febf4e3ba82b061e12b66dca308dee2
Created February 25, 2019 15:39 — forked from hacksalot/gist:746c3290a7c2e077ed91
Install Ruby/DevKit + Jekyll on Windows

Install Ruby 2.1.5

  1. Install [Ruby 2.1.5 for Windows (x64)][1] from [RubyInstaller.org][2].

    • Set Install Tcl/Tk support.
    • Set Add Ruby executables to your path
    • Set Associate .rb and .rbw files with this Ruby installation.
    • Do NOT include whitespaces in the destination folder.
  2. Run ruby -v to verify command line access and version.

@wsdjeg
wsdjeg / markdown.vim
Created February 24, 2019 13:09
Markdown syntax with colored YAML front matter
" Save this file as: .vim/after/syntax/markdown.vim
exe 'runtime! syntax/yaml.vim'
unlet! b:current_syntax
syn include @YamlTop syntax/yaml.vim
unlet! b:current_syntax
syn region yamlHead start="\%^---$" end="^---\s*$" keepend contains=@YamlTop,@Spell
@wsdjeg
wsdjeg / rfc.md
Created February 12, 2019 15:25 — forked from puremourning/rfc.md
RFC: Parameter hints popup menu

TL;DR

This RFC proposes introducing a second popup menu in insert mode to display method argument hints, current parameter, etc. similar to a number of IDEs and editors. The proposal is to allow scripts to control this (such as on insert of ( and ) characters) and for it to be non-interractive and not to interfere with insert-mode completion.

The purpose of the RFC is to guage the appetite from Bram and the community for such a feature, and to discuss the design/functional behaviours prior to

@wsdjeg
wsdjeg / crlf.py
Created February 12, 2019 14:25 — forked from jonlabelle/crlf.py
Replace CRLF (windows) line endings with LF (unix) line endings in files.
#!/usr/bin/env python
"""Replace line breaks, from one format to another."""
from __future__ import print_function
import argparse
import glob
import os
import sys