Skip to content

Instantly share code, notes, and snippets.

View jarontai's full-sized avatar
📖
I may be slow to respond.

Jaron Dai jarontai

📖
I may be slow to respond.
View GitHub Profile
@jarontai
jarontai / dart.md
Last active August 29, 2015 14:09 — forked from paulmillr/dart.md

---------- Forwarded message ----------

From: Mark S. Miller <[email protected]>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: [email protected]
dartium_path: /usr/local/Cellar/dartium/1.7.2/Chromium.app
dart_sdk_path: /usr/local/opt/dart/libexec

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@jarontai
jarontai / gist:f07edab66f6d3a0ad52c
Last active August 29, 2015 14:06
google sites for Chinese
https://www.glgoo.com/
https://wen.lu
https://xie.lu
https://gg.jude.me/
https://google.chn.im/
https://github.com/greatfire/wiki
@jarontai
jarontai / gist:8f91eb17cf9745142fac
Created September 2, 2014 01:49
install node via nvm on debian
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev
curl https://raw.githubusercontent.com/creationix/nvm/v0.14.0/install.sh | bash
nvm ls-remote
nvm install 0.10
nvm use 0.10
nvm alias default 0.10
@jarontai
jarontai / gist:76594a9edf5c51d3cba5
Created September 1, 2014 09:18
calculate the length of string which includes Chinese character
var len = content.match(/[^ -~]/g) == null ? content.length : content.length + content.match(/[^ -~]/g).length;
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@jarontai
jarontai / sublime keys
Created July 9, 2014 03:53
sublime keys
[
{ "keys": ["j", "j"],
"command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
{ "keys": ["tab"], "command": "move", "args": {"by": "characters", "forward": true},
mysql -u username -p database_name < file.sql
//check login
Mage::getSingleton('core/session', array('name'=>'frontend'));
$session = Mage::getSingleton('customer/session', array('name'=>'frontend'));
$loggedIn = $session->isLoggedIn();