Skip to content

Instantly share code, notes, and snippets.

View happydeveloper's full-sized avatar
🎯
Focusing

DU RU KANG happydeveloper

🎯
Focusing
  • duru
  • seoul, korea
View GitHub Profile
@happydeveloper
happydeveloper / gist:1226357
Created September 19, 2011 11:53 — forked from rillflow/gist:1226334
JavaScript closure stack
function insertClosureStack(obj, name, variable) {
var old = obj[name];
obj[name] = function (n) {
if ( typeof n == 'number' ) { // 인자가 있는 경우 검색 시작
if ( variable == n ) { // 클로저 꼭대기 환경변수 variable 값과 주어진 인자를 비교
console.log('found ' + variable); // 맞으면 출력
} else { // 아니면
if ( typeof old == 'function' ) { // 직전 환경을 갖고있는 클로저(function)가 정의되어 있는지 확인 후
old(n); // 있으면 호출하며 양파껍질 하나를 벗김
@yepp4you
yepp4you / gist:1369990
Created November 16, 2011 12:44
아아 이 어색함을 어쩔꼬 -_-);
vows = require 'vows'
assert = require 'assert'
tobi = require 'tobi'
vows.describe('Root').addBatch
'브라우저에서':
topic: -> tobi.createBrowser 3000, 'localhost'
'GET /의':
topic: (topic) ->
topic.get "/", @callback.bind(@, null)
@safe1981
safe1981 / Gist를 이용한 소스관리.markdown
Last active February 23, 2019 04:55
Article:Gist와 Sublime을 이용한 Code Snippet관리

#Gist를 이용한 코드조각관리 이번 글에서는 Code Snippet이라 불리는 코드조각을 효과적으로 어떻게 관리할 수 있을까에 대한 하나의 방법을 논하고자 한다. 개발을 진행하다보면 무수히 많은 코드를 작성하게 된다. 때때로 작성한 코드 중의 일부를 나중에도 활용해보기 위해 코드를 분류한다. 대체로 이런 경우 자신만의 메모장을 활용하거나, 자주 사용하는 에디터를 활용해서 이를 관리하는 경향이 있다. 하지만 이런 방법은 코드가 많아질수록 검색하기가 쉽지 않고, 개발언어에 따라 효율적으로 코드를 관리하기도 어렵다. 또한 개발하는 IDE환경에서도 손쉽게 사용할 수 없으며, 사무실/집 등, 여러 장소에서 동일하게 사용하는 것도 불가능하다. (물론 Dropbox)와 같은 클라우드 서비스를 활용하면 어느정도 다양한 환경에서 활용가능하지만 이 방법은 회사와 같이 보안 상의 이유로 서비스가 막혀 있는 곳에서는 제대로 적용이 불가능한 문제가 발생한다.

많은 웹사이트 조사를 통해 다양한 Snippet관리 서비스를 찾아봤지만, 그 중에서 개발에 가장 유용한 방식은 GitHub에서 제공하는 Gist라는 서비스를 이용하는 것이었다. 따라서 본 세션에서는 Gist를 이용한 Snippet관리 방식을 알아보고자 한다. 또한 최근 각광받고 있는 Sublime Text에서 Gist플러그인을 활용하여 어떻게 효율적으로 개발Editor와 함께 사용할 수 있는지도 알아보고자 한다.

#Gist환경 셋팅

Github 회원가입

Gist 사용을 위해서는 GitHub 회원가입을 한다. Github는 매우 유명하고 널리 퍼져있는 서비스이므로 서비스가 중단될 걱정을 하지 않고 사용할 수 있다. 외국사이트이니만큼 회원정보도 과도하게 요구하지 않는다.

Sublime에 Gist 플러그인 설치

@g3d
g3d / gist:2709563
Last active February 7, 2024 15:21 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
@dwayne
dwayne / 00-install-on-64-bit-ubuntu-14.04.md
Last active January 12, 2024 17:48
Installing node and npm on Ubuntu 12.04 LTS and 64-bit Ubuntu 14.04 LTS.
  1. Navigate to http://nodejs.org/download/ and on the Linux Binaries (.tar.gz) row click to download the 64-bit version of the current latest release.

  2. Say you've downloaded node-v0.10.7-linux-x64.tar.gz into the Downloads directory. Then, open the terminal and type the following:

$ cd ~/Downloads
$ mkdir -p ~/local/node
$ tar xzf node-v0.10.7-linux-x64.tar.gz -C ~/local/node --strip-components=1
$ echo '# Node Enviroment Setup' >> ~/.bashrc
$ echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.bashrc
@AhnSeongHyun
AhnSeongHyun / gist:3278879
Created August 6, 2012 22:03
measure time
DateTime startDateTime = new DateTime();
startDateTime = DateTime.Now; //현재 시간 저장
Console.WriteLine("Elasped Time[seconds] = {0}", MeasureRunTime(startDateTime));
static string MeasureRunTime(DateTime startDateTime)
{
DateTime endDateTime = new DateTime();
@RadLikeWhoa
RadLikeWhoa / bookmarklets-history.md
Last active March 7, 2024 21:03
A history of the networks added to the bookmarklets list.

January 14, 2013

News

  • Google Reader
  • Instapaper
  • Pinboard
  • Pocket
  • Readability
  • Storify
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jeffreybarke
jeffreybarke / ci-encryption-key-generator.php
Created April 9, 2013 17:21
This is the code I use (minus Google Analytics) for the CodeIgniter encryption key generator located at http://jeffreybarke.net/tools/codeigniter-encryption-key-generator/
<?php
/**
* Generate an encryption key for CodeIgniter.
* http://codeigniter.com/user_guide/libraries/encryption.html
*/
// http://www.itnewb.com/v/Generating-Session-IDs-and-Random-Passwords-with-PHP
function generate_token ($len = 32)
{
@krakjoe
krakjoe / pthreads.md
Last active August 30, 2023 18:30
pthreads.md

Multi-Threading in PHP with pthreads

A Brief Introduction to Multi-Threading in PHP

  • Foreword
  • Execution
  • Sharing
  • Synchronization
  • Pitfalls