Skip to content

Instantly share code, notes, and snippets.

View Nimor111's full-sized avatar
🎯
Focusing

Georgi Bojinov Nimor111

🎯
Focusing
View GitHub Profile

Define some paths as org-gtd variables are kinda wonky with when they load

(setq org-gtd-dir "~/Nextcloud/org/gtd")
(setq org-gtd-inbox "~/Nextcloud/org/gtd/inbox.org")
(use-package org-gtd
  :after org
  :straight (:host github :repo "trevoke/org-gtd.el" :branch "master")

The notes (zettelkasten) god

(use-package org-roam
  :straight t
  :init
  (setq org-roam-v2-ack t)
  :config
  (setq org-roam-directory "~/Nextcloud/org-roam")
  (setq org-roam-dailies-directory "daily/")

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#Game of Bottles HackBulgaria problem
class Bottle
attr_accessor :x,:y
def initialize(x,y)
@x = x
@y = y
end
def decode(string) #string is a string aight
decode_hash = Hash.new # hash to hold characters and times they are
# repeated
counter = 1
0.upto(string.length) do |i|
until(string[i] != decode_hash.key(decode_hash[string[i]]))
if ( i > string.length ) then break else
i += 1
#include <iostream>
#include <string.h>
int find_max_times(const char * string, char ch) {
int times = 0, max_times = 0;
for ( int i = 0 ; i < strlen(string); i++) {
if ( string[i] == ch ) {
times++;
while(string[i] == ch) {
times++;
@Nimor111
Nimor111 / Lakes.cpp
Last active September 18, 2016 19:05
#include <iostream>
#include <string.h>
using namespace std;
int solve_sector(const char * string, int & sectorIdx) {
int liters = 0, countD = 0, countU = 0, numberOfUs = 0;
bool isEnd = 0;
for ( int i = sectorIdx; i < strlen(string); i++) {
if ( string[i] == 'u' ) numberOfUs++;