Skip to content

Instantly share code, notes, and snippets.

View kimipeng's full-sized avatar
:octocat:
Focusing

Kimi Peng kimipeng

:octocat:
Focusing
  • Taipei
View GitHub Profile
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@kimipeng
kimipeng / install-git-completion.sh
Created January 8, 2019 02:58 — forked from johngibb/install-git-completion.sh
Mac OS X - Install Git Completion
URL="https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash"
PROFILE="$HOME/.profile"
echo "Downloading git-completion..."
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
fi
@kimipeng
kimipeng / CacheableImageView.java
Last active August 29, 2015 14:08 — forked from channing0221/CacheableImageView.java
[Android] Cacheable Image 圖片漸變效果
/*******************************************************************************
* Copyright 2011, 2012 Chris Banes. 2013 readyState Software Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@kimipeng
kimipeng / DrawableAlignedButton.java
Last active August 29, 2015 14:08 — forked from rajivnarayana/DrawableAlignedButton.java
[Android] Draw AlignedButton
package com.webileapps.myrtprofile;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.Button;
/**
*
@kimipeng
kimipeng / QuadEncoder.cpp
Last active August 29, 2015 14:08 — forked from adamzaninovich/QuadEncoder.cpp
[Anduino] "Menu" function Implement
/**
* QuadEncoder.cpp - Library for reading moves from a quadrature rotary encoder
* Created by Pedro Rodrigues (medecau@gmail.com) 9, January of 2010
* Released into the public domain.
*/
#include "Arduino.h"
#include "QuadEncoder.h"
QuadEncoder::QuadEncoder(int pin1, int pin2)