Skip to content

Instantly share code, notes, and snippets.

View yeonsh's full-sized avatar

Seunghoon Yeon yeonsh

View GitHub Profile
@yeonsh
yeonsh / libssh2-build-steps.rst
Created September 15, 2022 09:36 — forked from jpluimers/libssh2-build-steps.rst
Building `libssh2` for Windows (Win32/Win64) is a lot harder than I hoped for
@yeonsh
yeonsh / DateProgress.scriptable
Last active January 31, 2021 08:42 — forked from SDuck4/DateProgress.js
Date Progress - Progress bar widget for days, weeks, months and years
/**
* Date Progress - Progress bar widget for days, weeks, months and years
* - This widget run by Scriptable(https://scriptable.app).
* - This widget is optimized for 4x2 size.
* - Author: SDuck (https://twitter.com/sduck4)
* - Source: https://gist.github.com/SDuck4/a655230ec214083e432566a84e24c5f8
*
* Parameters:
* - Each parameter is separated by `|`(vertical bar) and must be entered in the following order.
* - If you do not use the parameters, you can skip them.
@yeonsh
yeonsh / # neovim - 2016-03-23_07-30-45.txt
Created March 22, 2016 22:35
neovim (neovim/neovim/neovim) on OS X 10.11.3 - Homebrew build logs
Homebrew build logs for neovim/neovim/neovim on OS X 10.11.3
Build date: 2016-03-23 07:30:45
from Foundation import *
from AppKit import *
from PyObjCTools import AppHelper
start_time = NSDate.date()
class MyApplicationAppDelegate(NSObject):
state = 'idle'
@yeonsh
yeonsh / gist:f900fd820e3d0d23b142
Created September 11, 2015 04:52
cmake --help-policy CMP0042 (About @rpath)
$ cmake --help-policy CMP0042
CMP0042
-------
``MACOSX_RPATH`` is enabled by default.
CMake 2.8.12 and newer has support for using ``@rpath`` in a target's install
name. This was enabled by setting the target property
``MACOSX_RPATH``. The ``@rpath`` in an install name is a more
flexible and powerful mechanism than ``@executable_path`` or ``@loader_path``
@yeonsh
yeonsh / $ brew install $(brew deps owncloud-client)
Created September 11, 2015 04:06
$ brew install $(brew deps owncloud-client)
$ brew install $(brew deps owncloud-client)
Warning: cmake-3.3.1 already installed
Warning: pkg-config-0.28 already installed
==> Downloading https://homebrew.bintray.com/bottles/d-bus-1.8.20.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring d-bus-1.8.20.yosemite.bottle.tar.gz
==> /usr/local/Cellar/d-bus/1.8.20/bin/dbus-uuidgen --ensure=/usr/local/var/lib/dbus/machine-id
==> Caveats
To have launchd start d-bus at login:
ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents
@yeonsh
yeonsh / gist:811a32f4af42ee98578f
Created April 10, 2015 14:19
Change log format to make it conform to Linux g++ rules.
import os
import re
regex = re.compile(r"(.*)(GLOG[A-Z]*\([A-Z]+::[A-Z_]+\s*,\s*)(__FUNCTION__)\s*(\")([^\"]+\")(\s*,\s*.*){0,1}(\s*\)\s*;){0,1}")
def test_code():
s=[]
s.append(' GLOGNOFLA(LOGLEVEL::LL_DEBUG, __FUNCTION__ " toSign [%s]");')
s.append(' GLOGNOFLA(LOGLEVEL::LL_DEBUG, __FUNCTION__ " toSign [%s]", toSign.c_str());')
s.append('GLOGNOFLA(LOGLEVEL::LL_ERROR, __FUNCTION__ " failed(%s) : %s", rtn.curlerror.c_str(), curl->GetLastURL().c_str());')
@yeonsh
yeonsh / gist:4b3e59d3fc2fdb21c122
Created January 10, 2015 12:08
Python logging
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
# create a file handler
handler = logging.FileHandler('hello.log')
handler.setLevel(logging.INFO)
@yeonsh
yeonsh / tour_of_go_answers
Last active August 29, 2015 14:06
Tour of Go exercise solutions
// #38
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
board := make([][]uint8, dx)
for i := 0; i < dx; i++ {
board[i] = make([]uint8, dy)
iex> 1 # integer
iex> 0x1F # integer
iex> 1.0 # float
iex> :atom # atom / symbol
iex> {1,2,3} # tuple