Skip to content

Instantly share code, notes, and snippets.

@haruair
haruair / ratebutton.m
Created March 13, 2014 00:10
Rate Button
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=824136867"]];
@haruair
haruair / gist:9971560
Created April 4, 2014 09:58
GIt commit name update
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "old-name" ];
then
GIT_COMMITTER_NAME="new-name";
GIT_AUTHOR_NAME="new-name";
GIT_COMMITTER_EMAIL="email@domain.name";
GIT_AUTHOR_EMAIL="email@domain.name";
git commit-tree "$@";
else
@haruair
haruair / maps3.js
Created April 18, 2014 14:22
Daum map API v3 with DOM
(function (e, d) {
if (typeof d == "object") {
for (var f in d) {
if (d.hasOwnProperty(f)) {
e[f] = e[f] || d[f], arguments.callee(e[f], d[f]);
}
}
}
})(this, {
daum: {
@haruair
haruair / zipdeploy
Last active August 29, 2015 14:01
Git diff the extract as a zip file
#!/bin/bash
NOW=$(date +"%Y-%m-%d-%H%M%S")
DIFF=$(git diff --name-only deploy HEAD)
TOPLEVEL=$(git rev-parse --show-toplevel)
CURRENT=$(pwd)
if [ -z "$DIFF" ]
then
echo "😝 Sorry no diff in there."
else
cd "$TOPLEVEL"
@haruair
haruair / Person.js
Last active August 29, 2015 14:02
defineProperty test
"use strict";
var Person = function(name){
var _name = name || "Unknown";
Object.defineProperty(this, "name", {
get: function(){ return "My name is " + _name; },
set: function(newvalue){ _name = newvalue; }
});
@haruair
haruair / scrapbook.php
Created October 4, 2014 15:40
Scrapbook plugin for Wordpress
<?php
/**
* @package Haruair
* @version 1.0
*/
/*
Plugin Name: Scrapbook
Description: scrapbook custom type plugin
Author: haruair
Version: 1.0
@haruair
haruair / chmoddefault
Created December 15, 2014 00:06
chmoddefault
#!/bin/bash
# put this file into /usr/bin
# set the file as correct permission
read -r -p "Are you sure? [y/N] " response
case $response in
[yY][eE][sS]|[yY])
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
;;
*)
@haruair
haruair / Package Control.sublime-settings
Last active August 29, 2015 14:11
Sublime Text Setting
{
"in_process_packages":
[
],
"installed_packages":
[
"3024 Color Scheme",
"Better CoffeeScript",
"BracketHighlighter",
"Emmet",
{
"selector": "source.ts",
"cmd": ["tsc", "$file"],
"file_regex": "^(.+?) \\((\\d+),(\\d+)\\)(: .+)$",
"line_regex": "\\((\\d+),(\\d+)\\)",
"osx": {
"path": "/usr/local/bin:/opt/local/bin"

#할 일을 적는다

  • 요래 적으면
  • 편리합니다.