Skip to content

Instantly share code, notes, and snippets.

View poyaz's full-sized avatar
🏠
I have started a new journey in Goland

pooya azarpour poyaz

🏠
I have started a new journey in Goland
View GitHub Profile
@poyaz
poyaz / .gitconfig
Created February 26, 2024 06:48
.gitconfig
[core]
pager = cat -
[user]
email = user@example.com
name = user
[includeIf "hasconfig:remote.*.url:https://test.com/**"]
path = ~/.gitconfig.d/test.gitconfig
@poyaz
poyaz / Makefile
Last active March 8, 2024 19:10
Makefile for init nestjs
NEST_PROJECT_DIR ?= $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
NEST_PROJECT_NAME ?=
check_defined = \
$(strip $(foreach 1,$1, \
$(call __check_defined,$1,$(strip $(value 2)))))
__check_defined = \
$(if $(value $1),, \
$(error Undefined $1$(if $2, ($2))))
@poyaz
poyaz / cloudSettings
Last active March 26, 2021 17:55
Visual Studio Code Settings
{"lastUpload":"2021-03-26T17:58:25.804Z","extensionVersion":"v3.4.3"}
@poyaz
poyaz / spotify-current-song-copy.sh
Last active September 21, 2020 05:48
Get current spotify song's title
#!/bin/bash
_clipcopy () {
local file=$1
if [[ $OSTYPE == darwin* ]]
then
echo "$file" | pbcopy
elif [[ $OSTYPE == cygwin* ]]
then
@poyaz
poyaz / libreoffice-convert-csv-to-excel.sh
Last active September 20, 2020 08:41
convert csv to excel
libreoffice --headless --convert-to xlsx --infilter=CSV:44,34,76,1 <csv-files> --outdir <output-dir>
@poyaz
poyaz / month.cpp
Last active January 15, 2020 05:02
c++ sample month generator with holiday
#include <iostream>
#include<string>
using namespace std;
const string MONTH_START_SAT = "sat";
const string MONTH_START_SUN = "sun";
const string MONTH_START_MON = "mon";
const string MONTH_START_TUE = "tue";
const string MONTH_START_WED = "wed";
https://github.com/i3/i3/issues/3602#issuecomment-457374699
@poyaz
poyaz / encoding.js
Created March 6, 2018 05:02
node js Zig-Zag/VInt Encoding
function encodeZigZag32 (n) {
return (n << 1) ^ (n >> 31);
}
function encodeZigZag64 (n) {
return (n << 1) ^ (n >> 63);
}
function decodeZigZag32 (n) {
return (n >> 1) ^ -(n & 1);