Skip to content

Instantly share code, notes, and snippets.

View afrontend's full-sized avatar

Bob Hwang afrontend

View GitHub Profile
@afrontend
afrontend / ratmenu_test.sh
Last active July 2, 2017 04:23
ratmenu sample script
#!/usr/bin/env bash
ratmenu -label term -back xmenu -style dreary -bg RosyBrown -fg Black -align left -font '10x20' \
" terminology " "terminology" \
" terminator " "terminator" \
" gnome-terminal " "gnome-terminal"
@afrontend
afrontend / withoutAsync.js
Created July 2, 2017 04:19
Async 모듈 사용전 도서 검색 코드
checkPointLimit = booklist.length;
appendBookId(booklist, body);
_.each(booklist, function(book, key) {
var o = _.clone(opt);
o.bookId = book.bookId;
var index = key;
searchDetail(o, function (err, exist) {
@afrontend
afrontend / withAsync.js
Last active July 2, 2017 04:21
Async 모듈 사용 후 도서 검색 코드
appendBookId(booklist, body);
var tasks = [];
_.each(booklist, function(book, key) {
var o = _.clone(opt);
o.bookId = book.bookId;
tasks.push(function (callback) {
searchDetail(o, function (err, exist) {
if (err) {
@afrontend
afrontend / temperature.sh
Last active July 20, 2017 15:02
서울의 현재 기온을 표시하는 자바스크립트를 생성하는 bash 스크립트, https://agvim.wordpress.com/2017/07/06/reading-web-data-using-javascript-in-node-js/
#!/usr/bin/env bash
# Filename: temperature.sh
command -v npm >/dev/null 2>&1 || { echo >&2 "I require npm but it's not installed. Aborting."; exit 1; }
command -v node >/dev/null 2>&1 || { echo >&2 "I require node but it's not installed. Aborting."; exit 1; }
cd /tmp
npm install request cheerio
{
"manifest_version": 2,
"name": "Reading Web Data Example",
"description": "This extension shows a current temperature of the seoul",
"version": "1.0",
"browser_action": {
"default_popup": "popup.html"
},
"permissions": [
"https://www.accuweather.com/"
@afrontend
afrontend / main.js
Last active August 31, 2022 00:35
일렉트론 사용하여 웹 데이터 읽기, https://agvim.wordpress.com/2017/07/24/read-web-data-with-electron/
const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow
const path = require('path')
const url = require('url')
// Keep a global reference of the window object, if you don't, the window will
@afrontend
afrontend / javascript-array-method.js
Created August 23, 2017 13:00
Python list method vs. JavaScript Array method
a = [1]
a
a.push(2)
a
a[a.length] = 9
a
a = a.concat([4, 5])
a
a.splice(a.length, 0, 5, 6, 7)
a
a = {}
b = new Object()
typeof(a)
typeof(b)
a
b
a['name'] = 'apple'
a['color'] = 'red'
a
Object.entries(a)
<!DOCTYPE html>
<html>
<head>
<title>네모 굴리기 - HTML, CSS 사용한 버전</title>
<meta charset="utf-8" />
<style>
.square {
width: 100px;
height: 100px;
border: 1px solid red;
{-~/.xmonad/xmonad.hs-}
{-xmonad 0.11.1-}
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
import XMonad.Actions.CycleWS
import qualified XMonad.StackSet as W