Skip to content

Instantly share code, notes, and snippets.

sudo build

Soheil Rashidi soheilpro

sudo build
Block or report user

Report or block soheilpro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
soheilpro /
Created Mar 25, 2014
Replace string in all Git history.
git filter-branch --tree-filter "find . -name '*.*' -exec sed -i '' -e 's/OLDSTRING/NEWSTRING/g' {} \;" -f
soheilpro /
Last active May 22, 2019
Easy IIS log file format specification for goaccess.
goaccess -f u_ex150629.log --log-format "$(cat u_ex150629.log | ./" --date-format '%Y-%m-%d' --time-format '%H:%M:%S'
View gist:c35ab5717ffa90f4d5b99d6361d9aefd
POST /sql-2018.8.20/_analyze
"field": "query_base.keyword",
"text" : "foo"
soheilpro / request.json
Created Aug 21, 2018
Elasticsearch Index Template
View request.json
PUT _template/sql
"template": "sql-*",
"mappings": {
"event": {
"properties": {
"query_base": {
"type": "text",
"fields": {
"keyword": {
View attack.js
#!/usr/bin/env node
var http = require('http');
if (process.argv.length <= 2) {
console.log('Usage: node attack.js <ip[:port]> <connections>')
var address = process.argv[2];
soheilpro / NSObject+Retry.h
Created May 24, 2013
A simple Objective-C category for retrying a block for n number of times.
View NSObject+Retry.h
@interface NSObject (Retry)
- (void)for:(NSInteger)times timesTryBlock:(void(^)(void(^)(NSError*)))block;
- (void)for:(NSInteger)times timesTryBlock:(void(^)(void(^)(NSError*)))block callback:(void(^)(NSError* error))callback;
View bars.json
"time": 1438415960000,
"open": 2570,
"high": 2630,
"low": 2513,
"close": 2522,
"volume": 1336207

Keybase proof

I hereby claim:

  • I am soheilpro on github.
  • I am soheilpro ( on keybase.
  • I have a public key whose fingerprint is EEA6 88EB 1846 D21A 94FE 61BC 5CD3 FD19 5F77 2375

To claim this, I am signing this object:

git config --global alias.fu = "!f() { git commit --fixup $1; EDITOR=cat git rebase --interactive --autosquash $1~; }; f"
soheilpro /
Created Jul 29, 2015
Simple web site monitoring script.
#!/usr/bin/env bash
DATE=$(TZ=Asia/Tehran date +"%Y-%m-%d %H:%M")
TIMESTAMP=$(TZ=Asia/Tehran date +"%Y%m%d%H%M")
# URLs
You can’t perform that action at this time.