Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"os"
"strings"
)
func main() {
name1, name2 := os.Args[1], os.Args[2]
@murat
murat / caps_generator.sh
Last active May 27, 2021 10:58
generate red labeled caps from any image easily.. :) \w imagemagick
#!/bin/sh
# chmod +x caps_generator.sh
# ./caps_generator.sh file.jpg 'dün dündür, bugün bugün'
montage -label "$2" $1 -geometry +0+0 -background red -pointsize 35 annotated_$1
@murat
murat / os.md
Last active October 22, 2023 12:29
Post install popos

Get updates

sudo apt update && sudo apt upgrade -y

Install utilities

sudo apt install -y curl wget git httpie jq vim unzip
@murat
murat / client.go
Created October 18, 2019 19:29 — forked from jzelinskie/client.go
grpc bidirectional streams in golang
package main
import (
"log"
"time"
"golang.org/x/net/context"
"google.golang.org/grpc"
pb "github.com/jzelinskie/grpc/simple"
### Keybase proof
I hereby claim:
* I am murat on github.
* I am muratbastas (https://keybase.io/muratbastas) on keybase.
* I have a public key ASC3AnbrigjvbD-YXi9-YAerjssDon0mtrUBTTQ0GPiQzgo
To claim this, I am signing this object:
@murat
murat / changelog.sh
Last active October 11, 2018 20:54
A shell script for generate CHANGELOG from git log
#!/bin/bash
if [ "$1" == "" ]; then
INITIAL=`git rev-list HEAD | tail -n 1`
else
INITIAL="$1"
fi
git log "$INITIAL"...HEAD --pretty=format:"- [%h](`git remote -v | grep fetch | head -1 | cut -f 2 | cut -d ' ' -f 1 | sed -e 's/git@/https:\/\//' -e's/\.git$//' | sed -E 's/(\/\/[^:]*):/\1\//'`/commit/%H) %s"
@murat
murat / shc
Created February 28, 2018 11:23
iTerm2 foreground color changer host based
#!/bin/bash
#
# (1) copy to: ~/bin/shc
# (2) set: alias ssh=~/bin/shc
set_term_bgcolor(){
local R=$1
local G=$2
local B=$3
/usr/bin/osascript <<EOF
@murat
murat / countries.json
Created May 5, 2016 10:44 — forked from keeguon/countries.json
A list of countries in JSON
[
{"name": "Afghanistan", "code": "AF"},
{"name": "Åland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"},
{"name": "AndorrA", "code": "AD"},
{"name": "Angola", "code": "AO"},
{"name": "Anguilla", "code": "AI"},
{"name": "Antarctica", "code": "AQ"},
@murat
murat / open-chrome-tabs-in-safari.scpt
Last active April 5, 2016 07:00 — forked from paulirish/open-chrome-tabs-in-safari.scpt
open chrome tabs in safari
tell application "Google Chrome"
set tab_list to every tab in the front window
repeat with the_tab in tab_list
set the_url to the URL of the_tab
tell application "Safari Technology Preview" to open location the_url
end repeat
end tell