Skip to content

Instantly share code, notes, and snippets.

View ur4ltz's full-sized avatar

Andy Shevchenko ur4ltz

  • Kharkiv - Ukraine, Glory to Ukraine
View GitHub Profile
@areina
areina / emacs-email-setup.md
Created October 12, 2012 15:00
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@alexott
alexott / minimial-cedet-config.el
Created October 22, 2012 07:30
Working configuration for CEDET from bzr & GNU Emacs (with working C++ & Java name completion)
;;; minimial-cedet-config.el --- Working configuration for CEDET from bzr
;; Copyright (C) Alex Ott
;;
;; Author: Alex Ott <alexott@gmail.com>
;; Keywords: cedet, C++, Java
;; Requirements: CEDET from bzr (http://cedet.sourceforge.net/bzr-repo.shtml)
;; Do checkout of fresh CEDET, and use this config (don't forget to change path below)
@Deco
Deco / socketlanes.lua
Created November 6, 2012 17:39
Multi-threaded LuaSocket with Lua Lanes example
--[[ socketlanes.lua
Multi-threaded LuaSocket with Lua Lanes example
===============================================
Depends on the following LuaSocket 2.0.2 patch:
http://www.net-core.org/dl/luasocket-2.0.2-acceptfd.patch
(via http://www.net-core.org/39/lua/patching-luasocket-to-make-it-compatible)
(provided at end of file)
@textarcana
textarcana / centos-install-syntax-highlighting-in-less.sh
Last active May 1, 2023 01:01
2020 update: just use bat(1) instead!!!! bat has git integration and also can show invisible characters! OLD STUFF: How to enable syntax-highlighting in less. Use `less -N` (or type -N while in less) to enable line numbers. Based on the procedure described in http://superuser.com/questions/71588
# Enable syntax-highlighting in less.
# Last tested on CentOS 6.3.
#
# First, add these two lines to ~/.bashrc
# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
# export LESS=" -R "
sudo yum -y install boost boost-devel ctags
wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm
@tylerneylon
tylerneylon / learn.lua
Last active April 2, 2024 15:09
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
(setq show-paren-style 'expression)
(show-paren-mode 2)
(menu-bar-mode -1)
(tool-bar-mode -1)
(setq make-backup-files nil) ; Don't want any backup files
(setq auto-save-list-file-name nil) ; Don't want any .saves files
(setq auto-save-default nil) ; Don't want any auto saving
@areina
areina / custom-mu4e-trash-folder.el
Created October 30, 2013 10:54
mu4e - Dynamic trash folder for multiple accounts
(defun custom-mu4e-trash-folder (msg)
(if msg
(cond
((string-match "foo@gmail.com" (mu4e-message-field msg :maildir))
"/foo0@gmail.com/[Gmail].Trash")
((string-match "foo@3scale.net" (mu4e-message-field msg :maildir))
"/foo@3scale.net/[Gmail].Trash"))
(mu4e-ask-maildir-check-exists "Save message to maildir: ")))
(setq mu4e-trash-folder 'custom-mu4e-trash-folder)
@leoliu
leoliu / gctags
Last active October 6, 2017 00:58
gctags
#!/bin/bash
export GTAGSLABEL=ctags
if [ -r $PWD/.globalrc ]; then
GTAGSCONF=$PWD/.globalrc
elif [ -r $HOME/.globalrc ]; then
GTAGSCONF=$HOME/.globalrc
elif [ -r /usr/local/share/gtags/gtags.conf ]; then
GTAGSCONF=/usr/local/share/gtags/gtags.conf
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@bonsaiviking
bonsaiviking / lua.vim
Last active April 4, 2022 14:38
A Vim indent file for the Lua scripting language. Install as ~/.vim/indent/lua.vim
" Vim indent file
" Language: Lua
" Maintainer: Daniel Miller <daniel@bonsaiviking.com>
" Original Author: Daniel Miller <daniel@bonsaiviking.com>
" Last Change: 2014 Feb 6
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif