Skip to content

Instantly share code, notes, and snippets.

View redlotus's full-sized avatar
💭
YOLO!!! 🚀

redlotus redlotus

💭
YOLO!!! 🚀
View GitHub Profile
@redlotus
redlotus / CMakeLists.txt
Created August 13, 2019 04:21 — forked from jroyalty/CMakeLists.txt
Work in progress CMake file for Redis simply for use in CLion
# vim: set ai expandtab:
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
# The following must be set BEFORE doing project() or eanble_language().
# ::-------------------------------------------------------------------------::
if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type defined; defaulting to 'Debug'")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
"The type of build. Possible values are: Debug, Release, RelWithDebInfo and MinSizeRel.")
@redlotus
redlotus / ginit.vim
Created May 16, 2019 12:11
ginit.vim
" for windows
" Gui
GuiTabline 0
GuiPopupmenu 0
GuiLinespace 1
Guifont Fira Code:h10
set termguicolors
" enable plugins
filetype on
syntax enable
@redlotus
redlotus / keybase.md
Created May 15, 2019 15:36
keybase.md

Keybase proof

I hereby claim:

  • I am redlotus on github.
  • I am redlotus (https://keybase.io/redlotus) on keybase.
  • I have a public key ASBHMSh2wFwBBsVzcYv0LIxma7gp41KPNy7ENlFcPrFCSAo

To claim this, I am signing this object:

@redlotus
redlotus / init.vim
Last active September 24, 2019 07:00
init.vim
set nocompatible
" enable plugins
filetype on
syntax enable
" basic settings
set laststatus=2 " Always show the statusline
"set term=$TERM
set encoding=utf-8 " Necessary to show unicode glyphs
" if $TERM!="linux" " if we are not in tty
@redlotus
redlotus / omnidb-server.md
Created August 3, 2018 10:24
omnidb-server-service

Hello, sorry for the delay :(

You could do something like this:

vim /lib/systemd/system/omnidb-server.service

Fill it with:

[Unit]
@redlotus
redlotus / openerp-Ubuntu-installation
Created July 30, 2018 08:07 — forked from aorborc/openerp-Ubuntu-installation
Install OpenERP 7 on Ubuntu
# copied only the scripts from http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/
sudo apt-get install openssh-server denyhosts
sudo apt-get update
sudo apt-get dist-upgrade
sudo adduser --system --home=/opt/openerp --group openerp
sudo apt-get install postgresql
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
#Enter password for new role: ********
@redlotus
redlotus / pgsql_backup.sh
Created July 28, 2018 13:06 — forked from sirbrillig/pgsql_backup.sh
Postgresql daily backup script.
#!/bin/bash
#
# Backup a Postgresql database into a daily file.
#
BACKUP_DIR=/pg_backup
DAYS_TO_KEEP=14
FILE_SUFFIX=_pg_backup.sql
DATABASE=
USER=postgres
@redlotus
redlotus / get_shift_details_based_on_location.sql
Created June 8, 2018 05:09
get_shift_details_based_on_location
CREATE OR REPLACE FUNCTION public.get_shift_details_based_on_location (invid INTEGER)
RETURNS TABLE (product_sku_id INTEGER, product_name CHAR VARYING, g_code CHAR VARYING, s_code CHAR VARYING, m_code CHAR VARYING [ ], location_id INTEGER, location_name CHAR VARYING, time_finalization TIMESTAMP WITHOUT TIME ZONE, confirmed_quantity INTEGER, finalized_quantity INTEGER, current_quantity INTEGER, inventoried_list TEXT [ ], confirmed_list TEXT [ ])
AS $function$
BEGIN
RETURN QUERY
SELECT
sif.product_sku_id product_sku_id,
pt.name product_name,
ps.g_code g_code,
ps.s_code s_code,
@redlotus
redlotus / postgres_queries_and_commands.sql
Created May 11, 2018 17:17 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@redlotus
redlotus / slack-solarized-theme.css
Created January 18, 2018 02:48 — forked from anziem/slack-solarized-theme.css
Solarized theme for Slack (including background - not just sidebar)
#msgs_scroller_div::-webkit-scrollbar-track, #client_body::before, .client_container,
#search_terms, #client_body, #footer, ts-message, .channel_header, ts-jumper ts-jumper-container,
ts-jumper input[type="text"] {
background: #002B36 !important;
}
#client_body::before {
border-bottom: 1px solid #268BD2 !important;
}