Skip to content

Instantly share code, notes, and snippets.

View palikar's full-sized avatar
🙃
Develpoing

Stanislav Arnaudov palikar

🙃
Develpoing
  • Karlsruhe, Germnay
View GitHub Profile
#+BEGIN_SRC emacs-lisp
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "firefox")
(google-this-mode 1)
(global-set-key (kbd "C-c g") 'google-this-mode-submap)
;;(global-set-key (kbd "C-c g") 'google-this)
#+END_SRC
@palikar
palikar / install_setup.sh
Created October 8, 2018 21:24
System setup
#!/bin/bash
sudo apt-get install git
mkdir -p ~/code && git clone xhttps://github.com/palikar/dotfiles ~/code/dotfiles
cd ~/code/dotfiles && . install.sh
@palikar
palikar / iedit.org
Created October 17, 2018 09:19
IEdit emacs config

IEdit is kinda like real time search and replace. It’s similar to that one vim feature that I see people using from time to time. After a word is selected by the region, you can go into iedit-mode with M-i and while editing the marked region, all other occurrences will be changed accordingly.

(require 'iedit)
(define-key my-keys-mode-map (kbd "M-i") 'iedit-mode)
@palikar
palikar / opencv_skin_segmentation.cpp
Created October 17, 2018 11:27 — forked from ndrplz/opencv_skin_segmentation.cpp
Simple hand segmentation from the webcam streaming.
#include <opencv2\opencv.hpp>
using namespace cv;
using std::cout;
/*--------------- SKIN SEGMENTATION ---------------*/
int main () {
VideoCapture cap(0);
if(!cap.isOpened())
@palikar
palikar / evm.sh
Last active October 31, 2018 21:03
Install Cask on Travis CI
#!/bin/sh
# This script will setup Evm (Emacs Version Manager) and Cask on
# Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh
#
# Emacs 24.3 is installed in the above script because Cask requires
@palikar
palikar / pkgbuild.cc
Created November 23, 2018 17:43
Maybe useless, will see
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <unordered_map>
#include <regex>
#include <algorithm>
#include <boost/filesystem.hpp>
@palikar
palikar / faces.el
Last active November 26, 2018 08:58
custom faces at work
(customset-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(company-preview ((t (:background "#444444" :foreground "light sky blue"))))
'(company-tooltip ((t (:background "#444444" :foreground "light sky blue"))))
'(company-tooltip-annotation ((t (:foreground "deep sky blue"))))
'(iedit-occurrence ((t (:background "pale green" :foreground "black")))))
@palikar
palikar / anonymous-gist.
Created December 7, 2018 16:22
Kill whole word in emacs
(defun kill-whole-word ()
(interactive)
(backward-word)
(kill-word 1)
)
(global-set-key (kbd "C-c w") 'kill-whole-word)
@palikar
palikar / anonymous-gist.cpp
Last active January 11, 2019 14:47
Shapes with strides and dimenstions for multi dim array
#include <cstdint>
#include <vector>
#include <initializer_list>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <iterator>
#include <stdexcept>
#include <utility>
#include "range.hpp"
#ifndef UTIL_LANG_RANGE_HPP
#define UTIL_LANG_RANGE_HPP
#include <iterator>
#include <type_traits>
namespace util { namespace lang {
namespace detail {