Skip to content

Instantly share code, notes, and snippets.

View bimlas's full-sized avatar

Bimba Laszlo bimlas

  • Hungary
View GitHub Profile
@bimlas
bimlas / grep-full-text-search.sh
Last active May 1, 2020 09:49
Full text search with plain, vanilla Linux tools (Bash, Grep): Search for files that contain each word
#!/bin/bash
# grep-full-text-search.sh: Search for files that contain each word
#
# Usage:
# grep-full-text-search.sh GREP_OPTIONS PATTERNS FILE...
#
# Examples:
#
# # Show matches
# grep-full-text-search.sh --color -Hni "multiple keywords" *.txt
@bimlas
bimlas / prestashop-setup-for-your-clone.php
Last active September 20, 2017 12:58
How to clone Prestashop to localhost (or any other server)
<?php
// https://gist.github.com/bimlas/5b7c9b1fde2fc0d61ad5ef3709185dd4
$include_after_setup = 'include-after-setup.php';
?>
<html>
<body>
<h1>Prestashop: Setup for your clone</h1>
<b>This script will prepare your clone to work on the target server</b>

Contents of the file

puts 'Give me some Rubocop warning about long lines...........................................................'
1/0 # Division by zero (Rubocop+MRI), surrounding space missing (Rubocop)

master branch (d762930)

let g:neomake_verbose = 3 | NeomakeInfo

@bimlas
bimlas / themis.out
Last active March 3, 2017 07:09
Vitla.vim: DateTime: Failing test before #485 on Win64 + Vim32
1..123
not ok 1 - DateTime .from_unix_time() makes a DateTime object from unix time
# Error occurred line:
# 2: Assert Equals(dt.to_string(), '2012-01-02 03:04:05 +0900')
# The equivalent values were expected, but it was not the case.
#
# expected: '2012-01-02 03:04:05 +0900'
# got: '10178-02-16 07:04:05 +0900'
ok 2 - DateTime .from_date() makes a DateTime object from date info
ok 3 - DateTime .from_format() makes a DateTime object from formatted string
@bimlas
bimlas / .cvimrc
Last active February 26, 2017 22:20
cVim (Chrome Vim extension) config file
" Don't forget to start cvim_server.py
" https://github.com/1995eaton/chromium-vim/blob/master/cvim_server.py
" Remember: sync in cVim does not updates gist, but overrides local settings.
let hintcharacters = "asdfghjkluiopqwer"
set nosmoothscroll
let barposition = "bottom"
let completionengines = ["google"]
" Default Google search locale.
@bimlas
bimlas / with-gitconfig.out
Last active February 18, 2017 21:26
Output of themis on lambdalisue/gina.vim#16@f98fe6f (Windows64, Vim 8.206)
***********************************************************
v:progname: vim.exe
v:version: 800
has("lua"): 1
has("python"): 1
has("python3"): 1
$LANG: HU
&encoding: utf-8
&termencoding: cp1250
&fileencodings: ucs-bom,utf-8,default,latin1
#!/bin/bash
# Do a substitution on the files to get a pretty vimdiff:
# %s/^ [0-9.]\+ \|^Neomake \[[0-9.]\+\]:/[TIME] /
# GVIM=/c/app/vim/vim80/gvim.exe
# VERSION=8.0.0027
GVIM=/c/app/vim/vim8.0.0021/gvim.exe
VERSION=8.0.0021
NEOMAKE=~/.vim/plugins/neomake

Contents of the file

puts 'Give me some Rubocop warning about long lines...........................................................'
1/0 # Division by zero (Rubocop+MRI), surrounding space missing (Rubocop)

master branch (d762930)

let g:neomake_verbose = 3 | NeomakeInfo

<?php
quver_oapr __DIR__ . '/iradbe/nhgoload.cuc';
redhvre_bapr __DVE__ . '/../ne/vadex.puc';
clnff Aalnt rxteaqf Vnynfmtungb /*{{{*/
{
cubyvp shnctvba mrtwryeavgurgo($kizrarg)
{
/**
Pynff.puc';
frffvonRkcver();
// HEYAP BEALLITASNV
// ===========================================================================
vs ((!iffrg($_FESSION['mhaxnzrart'])) || getCnenzrgreekVnygbmgnx()) {
sorrnpu (Neray('s', 'p', 'y') as $paramegre) {
vs (vffet($_GET[$cnenzrger])) {