Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
package StringSplitter;
use strict;
use warnings;
use base 'Exporter';
use constant {
APOS => 1,
QUOTE => 2,
"""
QClient is a Python implementation of Remote Quik client.
Remote Quik is a tool allowing Quik trading terminal to be
accessed via network.
Quik has a text based protocol:
<payload length>:[<optional packet id>:]<payload encoded in json>
Payload length should not include its own length.
Response from server on call with same ID as request.
local function onClientPackage(client, package)
local message, func, args, response, success
local s, e = package:parsePackage()
if not s then
message = 'Invalid request'
else
func, args = package.data.func, package.data.args
if not func or not args or type(func) ~= 'string' or type(args) ~= 'table' then
#!/usr/bin/ruby
require 'google/api_client'
class DriveClient
def initialize(issuer, license, pass)
@client = Google::APIClient.new(application_name: 'Document Library', application_version: '1.0')
@client.authorization = Google::APIClient::JWTAsserter.new(
issuer,
Hi.
I very like VIM editor, its concept is just awesome and when you get used to it your efficiency becomes over 9^1000.
But VIM has issues:
1. Single threaded. Stuff like CtrlP or NeoComplCache are running in foreground and you can't do anything until they finish.
2. Lacks API. Only system() is accessible, you can't establish a connection to remote host (socket), or spawn some process and read/write to it (pipe). One must use one of languages that has bindings which is not portable (its not guaranteed that potential users have this language enabled) and is a pretty hacky thing in general.
3. Very IMHO: vim-script is another example of how to don't write languages: limited, spontaneous API (functions were added on occasion, they're not systemized), OOP is really wierd and rarely used, no namespaces... One can of course use bindings for other languages (Python, Ruby, Perl, Lua, ...), but they all have quiet limited API and you still have to mess with vim-script.

Hi.

I very like VIM editor, its concept is just awesome and when you get used to it your efficiency becomes over 9^1000. But VIM has issues:

  1. Single threaded. Stuff like CtrlP or NeoComplCache are running in foreground and you can't do anything until they finish.

  2. Lacks API. Only system() is accessible, you can't establish a connection to remote host (socket), or spawn some process and read/write to it (pipe). One must use one of languages that has bindings which is not portable (its not guaranteed that potential users have this language enabled) and is a pretty hacky thing in general.

  3. Very IMHO: vim-script is just another example of how to don't write languages: limited, spontaneous API (functions were added on occasion, they're not systemized), OOP is really wierd and rarely used, no namespaces... One can of course use bindings for other languages (Python, Ruby, Perl, Lua, ...), but they all have quiet limited API and you still have to mess with vim-script.

-------------------------------------------------------------------------------
-- PrefixTree class implements classic prefix tree data structure with
-- inheritance. Which means that if path can't be found or doesn't contain
-- value for given path then parent prefix table is requested.
--
-- Underlying data structure is based on plain tables (w/o setting any
-- metatables) and looks like this:
-- {
-- n=order of insertion,
-- value=stored value,
#!/bin/sh
BASE_DIR="`dirname "$0"`"
cd $BASE_DIR || exit 1
ME="`basename "$0"`"
ENV_DIR="env"
REQUIREMENTS="requirements.txt"
MIGRATIONS="migrations"
warn(){
#!/bin/sh
TABLE="ssh"
IPT="/usr/sbin/iptables"
die(){
echo "$@"
exit 1
}
function strip(s){
return s.replace(/^\s+|\s+$/, '');
}
var encoder = encodeURIComponent || escape;
function urlt(url, def){
def = def || {};
return function(vars){