Skip to content

Instantly share code, notes, and snippets.

View tinylucid's full-sized avatar

Filip Miletic tinylucid

View GitHub Profile
@tinylucid
tinylucid / DebianNetPackages
Created April 21, 2015 11:39
Packages for naked Debian
## Base package list for my Debian system configuration
## Openbox base
xorg openbox obmenu obconf nitrogen gmrun lxsession-lite fbxkb xcompmgr transset-df xscreensaver xfce4-power-manager terminator lxappearance grandr openbox-logout-script-basic tint2 catfish notify-osd hotkey-setup gksu gdebi gdm
## Thunar -> considering PCmanFM
thunar file-roller lha unrar unace lzop rzip unalz unzip zip zoo xz-utils arj thunar-archive-plugin thunar-media-tags-plugin thunar-thumbnailers
## Audio
alsa-base vlc libdvdcss2 lame volwheel xfce4-mixer
;; Don't load outdated byte code
(setq load-prefer-newer t)
;; Bootstrap 'use-package'
(eval-when-compile
(require 'package))
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/"))
(package-initialize)
[colors]
foreground = #AAAAB8
foreground_bold = #F7F6F2
cursor = #EF3B56
background = rgba (33,33,33)
# Black, Gray, Silver, White
color0 = #494949
color8 = #969896
color7 = #c5c8c6

Keybase proof

I hereby claim:

  • I am defphil on github.
  • I am phlm (https://keybase.io/phlm) on keybase.
  • I have a public key whose fingerprint is CB2B 5DC1 F45D 90AC 813C 0A13 B032 F3F8 459F 3439

To claim this, I am signing this object:

@tinylucid
tinylucid / makefile1
Created March 11, 2019 12:17
minimal c makefile template
CC = gcc
DEBUG = -ggdb -O0 -march=native
CFLAGS := $(DEBUG) -W -Wall -Wextra -Wpedantic -pedantic -ansi
LDLIBS := -lm
OUTPUT_OPTION = -MMD -MP -o $@
SRC := $(wildcard *.c)
OBJ := $(SRC:.c=.o)
DEP := $(SRC:.c=.d)
-include $(DEP)
@tinylucid
tinylucid / makefilecpp
Created March 11, 2019 12:17
minimal makefile for cpp
CC = clang++
CXX = clang++
DEBUG = -ggdb -O1 -march=native
RELEASE = -O2
CPPFLAGS := -I.
CXXFLAGS := $(DEBUG) -W -Wall -Wextra -std=c++17
LDLIBS := -lm
OUTPUT_OPTION = -MMD -MP -o $@ -MJ $@.json
# Modify your C++ filesuffix here:
@tinylucid
tinylucid / nixShellRust.nix
Created November 28, 2019 00:02
small nix script for nix-shell for Rust projects
let
mozilla = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
nixpkgs = import <nixpkgs> { overlays = [ mozilla ]; };
in
with nixpkgs;
mkShell {
buildInputs = [
clang # needed for bindgen
Xcursor.theme: whiteglass
Xcursor.size: 16
Xft.rgba: none
Emacs*font: -misc-fixed-medium-r-semicondensed--0-0-75-75-c-0-iso10646-1
Emacs*menubar.font: Fixed:pixelsize=13:style=SemiCondensed:lang=ru
Emacs*popup.font: Fixed:pixelsize=13:style=SemiCondensed:lang=ru
Emacs*dialog.font: Fixed:pixelsize=13:style=SemiCondensed:lang=ru
Emacs*foreground: grey90
Emacs*background: grey20
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include <array>
#include <algorithm>
#include <cmath>
using Lines = std::vector<std::string>;
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
std::vector<int> parse_input(std::string& in, char delimiter = ' ')
{
std::vector<int> result;
std::stringstream input_stream(in);
std::string parsed_number;