Skip to content

Instantly share code, notes, and snippets.

View rojaster's full-sized avatar
👁️
I am only the noise on the wires

alekum rojaster

👁️
I am only the noise on the wires
View GitHub Profile
@rojaster
rojaster / unsigned_bytes_reverse.cc
Created February 13, 2022 19:31
Unsigned int bytes reverse
// all the cases in the end gonna be reduced by compiler to the latest variant
// so even, knowing builtin function could save you time, but if you case
// recognizable by the compiler, don't worry to use your way of doing things.
#include <iostream>
#include <stdint.h>
using namespace std;
// 4 bytes: 3 2 1 0 -> 0 1 2 3
unsigned reverse_bytes(unsigned num) {
@rojaster
rojaster / .profile
Created February 6, 2022 22:41
Content of the .profile file with env variables and configs
# System Wide stuff
alias ll='ls -lah'
# Emacs
alias emacs='emacs -nw'
# Golang
export GOPATH="$HOME/Development/Go"
export PATH="$GOPATH/bin:$PATH"
@rojaster
rojaster / .tmux.conf
Created February 6, 2022 22:40
Additional tmux conf parameters to remap prefix key
# -- general -------------------------------------------------------------------
unbind C-b
set -g prefix `
bind-key ` send-prefix
@rojaster
rojaster / settings.json
Created February 6, 2022 22:37
Visual Studio Code Global Settings JSON
{
"explorer.confirmDragAndDrop": false,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"editor.fontFamily": "\"Jetbrains Mono ExtraLight\", \"Fira Code\",\"Source Code Pro\", \"Courier New\", monospace",
"editor.fontLigatures": true,
"workbench.colorTheme": "Darktooth",
"editor.fontSize": 15,
"files.exclude": {
"**/.classpath": true,
@rojaster
rojaster / androp.py
Created December 19, 2019 01:41
Rooted android phone cpu topology
#!/usr/bin/env python3
#
# MIT License
# alekum(aka rojaster)
# 19/12/2019 ver 0.0.1
#
import os
import sys
from ppadb.client import Client as ADBClient
@rojaster
rojaster / .spacemacs
Last active February 6, 2022 22:38
.spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@rojaster
rojaster / singleton_rules.cpp
Created March 27, 2019 21:45
Display items from the list in two lines. The odds in the first row and evens in the second row. (http://tpcg.io/CXNuxt)
#include <iostream>
#include <list>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <functional>
// если использовать это то получается херово, потому что будет два вызова
struct prtList
{
@rojaster
rojaster / arm_cross_lib_nonsense_remover.sh
Created February 28, 2019 22:47
Delete All Arm Cross Mess Nonse
# similar issue : https://askubuntu.com/questions/1083832/ubuntu-18-04-update-issue?rq=1
sudo apt purge libubsan0-armhf-cross libubsan0-armel-cross libstdc++6-armhf-cross libstdc++6-armel-cross \
libstdc++6-7-dbg-armhf-cross libstdc++-7-dev-armhf-cross libsfubsan0-armhf-cross libsfstdc++6-armhf-cross \
libsfgomp1-armhf-cross libsfcilkrts5-armhf-cross libsfatomic1-armhf-cross libsfasan4-armhf-cross \
libhfubsan0-armel-cross libhfstdc++6-armel-cross libhfgomp1-armel-cross libhfcilkrts5-armel-cross \
libhfatomic1-armel-cross libhfasan4-armel-cross libgomp1-armhf-cross libgomp1-armel-cross libgcc1-armhf-cross \
libgcc1-armel-cross libcilkrts5-armhf-cross libcilkrts5-armel-cross libc6-dev-armel-armhf-cross libc6-armhf-armel-cross \
libc6-armel-armhf-cross libatomic1-armhf-cross libatomic1-armel-cross libasan4-armhf-cross libasan4-armel-cross \
g++-7-arm-linux-gnueabihf g++-7-arm-linux-gnueabihf libasan4-dbg-armhf-cross libatomic1-dbg-armhf-cross \
libcilkrts5-dbg-armhf-cross libgcc-7-dev-armel-cross libgcc-7-dev-a
@rojaster
rojaster / value_decomposition.cpp
Last active December 12, 2018 06:07
Value Decomposition with example
/*
Burning Midnight oil.
Alekum. 2018.
*/
#include <iostream>
#include <iomanip>
#include <stdint.h>
#include <inttypes.h>
#include <bitset>
@rojaster
rojaster / README.md
Created September 6, 2016 19:55 — forked from hofmannsven/README.md
My simply Git Cheatsheet