Skip to content

Instantly share code, notes, and snippets.

View r6m's full-sized avatar
🏠
Working from home

Reza r6m

🏠
Working from home
  • localhost
View GitHub Profile
@r6m
r6m / bits.go
Created December 27, 2019 04:33
golagn bit mask big int
package bits
import "math/big"
// Flag is an alias of big.Int
type Flag struct {
Bits *big.Int
}
// NewFlag returns a Flag with 0 bits
@r6m
r6m / README.md
Last active December 25, 2019 04:48
go get private repository

using SSH key:

$ git config --global url."[email protected]:".insteadOf "https://github.com/"

using token

@r6m
r6m / instapy.py
Created December 16, 2019 08:34
instapy
"""
This template is written by @Nuzzo235
What does this quickstart script aim to do?
- This script is targeting followers of similar accounts and influencers.
- This is my starting point for a conservative approach: Interact with the
audience of influencers in your niche with the help of 'Target-Lists' and
'randomization'.
NOTES:
- For the ease of use most of the relevant data is retrieved in the upper part.
"""
@r6m
r6m / bash.sh
Created December 4, 2019 06:02
fing-blog-install-ruby-2.6.5
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
@r6m
r6m / readme.md
Created August 28, 2019 07:20 — forked from Ademking/readme.md
💚 Android : Send SMS through ADB

(Android 5)

Run :

adb shell service call isms 9 s16 "com.android.mms" s16 "123456789" s16 "null" s16 "MESSAGEBODY" s16 "null" s16 "null"

The method is :

@r6m
r6m / tl_convert.js
Created April 18, 2019 03:15 — forked from wfjsw/tl_convert.js
Convert TL-Schema File to JSON
'use strict';
var fs = require('fs')
var args = process.argv.slice(2);
// From https://github.com/lodash/lodash/blob/4.17.4/lodash.js#L6891
function compact(array) {
var index = -1,
length = array == null ? 0 : array.length,
# install grpc-web
# generate js
protoc --js_out=import_style=commonjs:client api/api.proto
# generate grpc
protoc --grpc-web_out=import_style=commonjs,mode=grpcweb:client api/api.proto
@r6m
r6m / locustfile.py
Created February 19, 2019 05:52 — forked from yamionp/locustfile.py
Websocket Locust Sample. locustfile and Echo/Chat Server
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
import json
import uuid
import time
import gevent
@r6m
r6m / Concepts.md
Created November 18, 2018 21:10 — forked from DarinM223/Concepts.md
Rust concept explanations

My explanation of the main concepts in Rust

There are three main concepts with Rust:

  1. Ownership (only one variable "owns" the data at one time, and the owner is in charge of deallocating)
  2. Borrowing (you can borrow a reference to an owned variable)
  3. Lifetimes (all data keeps track of when it will be destroyed)

These are fairly simple concepts, but they are often counter-intuitive to concepts in other languages, so I wanted to give a shot at

@r6m
r6m / terminal-git-branch-name.md
Created September 14, 2018 10:15 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {