Skip to content

Instantly share code, notes, and snippets.

@haruair
haruair / import_key_karabiner.sh
Last active March 15, 2021 14:42
HHKB-ish setting for Karabiner
#!/bin/sh
cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner
$cli set remap.fn_consumer_to_fkeys_f5 1
/bin/echo -n .
$cli set general.dont_remap_apple_keyboard 1
/bin/echo -n .
$cli set remap.fn_consumer_to_fkeys_f7 1
/bin/echo -n .
@haruair
haruair / index.html
Last active October 7, 2015 03:54 — forked from jvns/index.html
snake in d3
<html>
<head>
<title> it's a snake! </title>
<link rel="stylesheet" href="snake.css"> </link>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script>
<script src="snake.js"> </script>
</head>
<body>

#할 일을 적는다

  • 요래 적으면
  • 편리합니다.
@haruair
haruair / gist:b8ff4fb128488f5e1dbf
Last active May 6, 2018 22:28
How to get all category tree node in Magento
<?php
// Usually, you can get category tree from category helper
$helper = Mage::helper('catalog/category');
$nodes = $helper->getStoreCategories();
// return Varien_Data_Tree_Node_Collection
// via Mage_Catalog_Model_Resource_Category
// However, this get method return active category only.
// Most of the samples are for collection of the category.
@haruair
haruair / dudumchit.cow
Created March 19, 2015 03:05
dudumchit for cowsay
##
## Du Dum Chit!
##
$the_cow = <<EOC;
$thoughts
$thoughts
⊂_\
  \\ Λ_Λ
   \(‘ㅅ') Du Dum Chit!
    > ⌒\
{
"selector": "source.ts",
"cmd": ["tsc", "$file"],
"file_regex": "^(.+?) \\((\\d+),(\\d+)\\)(: .+)$",
"line_regex": "\\((\\d+),(\\d+)\\)",
"osx": {
"path": "/usr/local/bin:/opt/local/bin"
@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",
@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 / 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 / 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; }
});