Skip to content

Instantly share code, notes, and snippets.

View colus001's full-sized avatar

Seokjun Kim colus001

View GitHub Profile
@colus001
colus001 / another-extends.js
Created June 21, 2017 09:26
Prototype inheritance another way
function Human (name) {
this.name = name
this.race = 'human'
this.talk = function () {
console.log('Say my name!')
}
}
function White () {
Human.apply(this, arguments)
@colus001
colus001 / extends.js
Last active June 21, 2017 08:40
How to extends prototype properly
function Person (name) {
this.name = name
this.talk = function () {
console.log('My name is', this.name)
}
}
function Brazilian () {
// Without this line jose wouldn't have this.name. Optionally you can do this with some kind of init function
Person.apply(this, arguments)
@colus001
colus001 / quicksort.js
Last active July 6, 2017 04:29
Quick Sort in Javascript
// QUICK SORT ALGORITHM
// @params {Array} arr
// @returns {Array} arr
const quickSort = (arr) => {
if (arr.length < 2) return arr
const pivotIndex = Math.floor(Math.random() * arr.length)
const pivot = arr[pivotIndex], less = [], greater = []
for (let i = 0, l = arr.length; i < l; i++) {
@colus001
colus001 / remove-drop-shadow-mac-capture.sh
Created July 18, 2016 07:25
맥 캡쳐시 드롭 셰도우 삭제하기
#!/bin/sh
defaults write com.apple.screencapture disable-shadow -bool true && killall SystemUIServer
@colus001
colus001 / Create iOS Icons 2016 Sizes with 180.jsx
Last active April 4, 2020 05:25 — forked from alexsdesign/Create iOS Icons 2016 Sizes.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@colus001
colus001 / chrome-devtool-bug.html
Created February 1, 2016 02:09
Chrome dev tool pixel ratio bug
<style>
.container {
width: 100%;
}
.flex-wrapper {
display: flex;
}
.flex-1 {
@colus001
colus001 / node_speakable.js
Created August 30, 2015 03:08
lib/node_speakable.js
var EventEmitter = require('events').EventEmitter,
util = require('util'),
spawn = require('child_process').spawn,
http = require('http');
var Speakable = function Speakable(credentials, options) {
EventEmitter.call(this);
options = options || {}
@colus001
colus001 / speech_recognition.js
Created August 30, 2015 03:06
Speech Recognition for Raspberry PI
// Don't forget to run export AUDIODEV='hw:1,0' && export AUDIODRIVER="alsa"
var BUTTONS = {
RECORD: 18,
NEXT: 19,
PREV: 20,
OK: 21
};
var GPIO = require('node-pi-gpio');
@colus001
colus001 / uihook
Last active August 29, 2015 14:24
meteor uihooks for 3d box transtion
Template.portfolioHoldings.rendered = ->
@find('.js-holdings-list')._uihooks =
insertElement: (node, next) ->
$node = $(node)
if $node.hasClass('js-placeholder-holding-wrapper') or $node.hasClass('js-holding-search-wrapper')
console.log 'inserting...'
$node.insertBefore(next)
$node.css(
"z-index": "1000"
transform: "translateY(50%) rotateX(90deg)",
@colus001
colus001 / Seokjun Kim Resume.md
Last active August 29, 2015 14:18
Seokjun Kim Resume.md

Seokjun Kim

Software and Hardware Developer
Seoul, Korea / [email protected]

Objective

To explain what I've been done for my own pleasure and, of course, for my living.