Skip to content

Instantly share code, notes, and snippets.

View metacritical's full-sized avatar
Creating Black holes.

Pankaj Doharey metacritical

Creating Black holes.
View GitHub Profile
@metacritical
metacritical / neomuttrc
Created August 21, 2022 10:06 — forked from VladimirPal/neomuttrc
Minimal neomutt config for gmail imap
set imap_user="mail.vpal@gmail.com"
set imap_pass=`/usr/bin/security find-generic-password -w -a 'mail.vpal@gmail.com' -s 'Gmail'`
set folder=imaps://imap.gmail.com/
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# https://www.neomutt.org/guide/reference search sleep_time for additional info
set sleep_time=0 # be faster
@metacritical
metacritical / Install_xwidgets_emacs_mac.md
Last active August 21, 2022 10:16
Install Xwidgets emacs with webkit.
brew tap railwaycat/emacsmacport
brew install emacs-mac --with-native-comp --with-xwidgets --with-no-title-bars --with-modules

#Can also compile with: --with-natural-title-bar

`
;; Keybonds
(global-set-key [(hyper a)] 'mark-whole-buffer)
(global-set-key [(hyper v)] 'yank)
(global-set-key [(hyper c)] 'kill-ring-save)
(global-set-key [(hyper s)] 'save-buffer)
(global-set-key [(hyper l)] 'goto-line)
(global-set-key [(hyper w)]
(lambda () (interactive) (delete-window)))
(global-set-key [(hyper z)] 'undo)
@metacritical
metacritical / PUMA_on_ruby_onmac.md
Last active June 17, 2022 04:56
Puma issues due to openssl 1.1 on mac.

FOr following Puma Issue:

"symbol not found in flat namespace '_SSL_get1_peer_certificate'  (LoadError)"

Solution uninstall puma and install it with the same version as ruby is compiled with.

To find open ssl version of ruby:

@metacritical
metacritical / MacOS13_rubyinstall_RBENV.md
Last active January 26, 2023 13:11
Ruby Install issues with readline on MacOS ventura 13.0

Install Ruby on MacOS 13 Ventura and 13.1 with rbenv

Problem

While installing ruby on Macos 13.0 Ventura using Rbenv i encountered the following error:

BUILD FAILED (macOS 13.0 using ruby-build 20220610)

Inspect or clean up the working tree at /var/folders/rx/2t1vq1113zdf881c97p_trx80000gn/T/ruby-build.20220615125727.31030.xErorp
@metacritical
metacritical / doom.txt
Last active September 8, 2022 12:07 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@metacritical
metacritical / X11FullscreenHelper.java
Created January 8, 2022 02:22 — forked from vkravets/X11FullscreenHelper.java
Java Full Screen window on Linux OSs using native X11 calling
package org.linux.X11;
import com.sun.jna.Native;
import com.sun.jna.NativeLong;
import com.sun.jna.platform.unix.X11;
import java.awt.*;
/**
* Author: Vladimir Kravets
@metacritical
metacritical / RSI_and_StochRSI.py
Created January 1, 2022 17:06 — forked from ultragtx/RSI_and_StochRSI.py
Functions that calculate RSI and StochRSI which give the same value as Trading View. I wrote these functions as RSI and StochRSI functions from TA-Lib give different values as TV.
# calculating RSI (gives the same values as TradingView)
# https://stackoverflow.com/questions/20526414/relative-strength-index-in-python-pandas
def RSI(series, period=14):
delta = series.diff().dropna()
ups = delta * 0
downs = ups.copy()
ups[delta > 0] = delta[delta > 0]
downs[delta < 0] = -delta[delta < 0]
ups[ups.index[period-1]] = np.mean( ups[:period] ) #first value is sum of avg gains
@metacritical
metacritical / LICENSE
Created September 16, 2021 15:44 — forked from mattyclarkson/LICENSE
Compile time Murmur3_32 implementation using C++11 constexpr
The MIT License (MIT)
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@metacritical
metacritical / murmur3_constexpr.cpp
Created September 13, 2021 06:07 — forked from komiga/murmur3_constexpr.cpp
MurmurHash3 in C++11 using constexpr!
#include <cstddef>
#include <cstdint>
#include <cstdio>
namespace util {
struct funcs;
template <typename S> struct mh3_internal;
template <typename S, S default_seed> struct mh3;
typedef mh3<uint32_t, 0> mh3_default;