Skip to content

Instantly share code, notes, and snippets.

Avatar
🌈
Focusing

JohnGrib johngrib

🌈
Focusing
View GitHub Profile
View for_gg.vba
Sub exe()
Dim i As Integer
Dim j As Integer
Dim lastRow As Integer
Dim cUp As Double
Dim cDown As Double
lastRow = 8 ' 자료가 있는 마지막 행의 숫자를 적습니다.
@johngrib
johngrib / balloon.vim
Created Jan 7, 2019
use balloon in gui vim
View balloon.vim
function! SimpleBalloon()
return 'Cursor is at line/column: ' . v:beval_lnum . ', ' . v:beval_col .
\ ' in file ' . bufname(v:beval_bufnr) .
\ '. Word under cursor is: "' . v:beval_text . '"'
endfunction
set balloonexpr=SimpleBalloon()
set ballooneval
@johngrib
johngrib / examples.sh
Last active Jan 8, 2019
Print my examples of bash commands
View examples.sh
function exam {
wiki=`stat -f "%N" ~/johngrib.github.io/_wiki`
if [ "$1" = "-l" ]; then
egrep 'parent\s*:\s*command-line' $wiki/* -l 2> /dev/null \
| xargs grep 'summary' \
| sed "s,"$wiki"/,,; s,\.md:summary,," \
| column -ts':' | sort
return 0
fi
@johngrib
johngrib / contribution.sh
Created Dec 31, 2018
Show github contribution graph on terminal
View contribution.sh
#! /usr/local/bin/bash
MYGITHUB=johngrib
RAW=/tmp/$MYGITHUB-github
TABLE=/tmp/$MYGITHUB-github-table
COLORS=/tmp/$MYGITHUB-github-colors
curl -s https://github.com/$MYGITHUB/ > $RAW
TITLE=`cat /tmp/johngrib-github | pcregrep -M '[0-9,]+ contributions\s*\n\s*in the last year'`
@johngrib
johngrib / ltofzf.sh
Created Dec 17, 2018
print list to fzf
View ltofzf.sh
#! /usr/bin/env bash
function list() {
tempFile1=/tmp/`uuidgen`
tempFile2=/tmp/`uuidgen`
cat test > $tempFile1
_line=`{ grep -En "^\\s*$" $tempFile1 | cut -d: -f1; wc -l $tempFile1 | awk '{print $1}'; }`
_start=2
for ln in $_line; do
@johngrib
johngrib / .vimrc
Created Oct 23, 2018
.vimrc gitcommit setting
View .vimrc
augroup git_commit_helper
autocmd FileType gitcommit set textwidth=50
autocmd FileType gitcommit set colorcolumn=+1
autocmd FileType gitcommit highlight ColorColumn ctermbg=235 guibg=#2c2d27
augroup END
@johngrib
johngrib / fibonacci.go
Created Oct 1, 2018
Fibonacci example with goroutine
View fibonacci.go
package main
import "fmt"
func main() {
c := make(chan int, 3)
quit := make(chan int)
go func() {
@johngrib
johngrib / turtle_test.py
Created Sep 29, 2018
turtle triangle and rectangle
View turtle_test.py
import turtle as t
t.shape("turtle") # 이 부분
t.fd(100)
t.lt(120)
t.fd(100)
t.lt(120)
t.fd(100)
t.left(120)
View show_turtle_symbol.py
import turtle as t
t.shape("turtle") # 이 부분
t.fd(100)
t.lt(120)
t.fd(100)
t.lt(120)
t.fd(100)
t.left(120)
View keybase.md

Keybase proof

I hereby claim:

  • I am johngrib on github.
  • I am johngrib (https://keybase.io/johngrib) on keybase.
  • I have a public key ASBRNS7l0EEzQsZwkKiT55hCy9koaPAFaBYOKQGmvuewEgo

To claim this, I am signing this object: