Skip to content

Instantly share code, notes, and snippets.

@ChiaraHsieh
ChiaraHsieh / tree.py
Last active September 26, 2018 05:51
asterisk Christmas tree
# 9-24-2018 by Chiara Hsieh
# Draw a Christmas tree with this code snippet
import sys
def tree_chunk(width, bottom, top):
for i in range(bottom, top, 2):
spaces=(width-i)/2
for j in range(spaces):
sys.stdout.write (' ')
@ChiaraHsieh
ChiaraHsieh / android-icon-sample.java
Last active January 3, 2016 02:09
Android built-in icon usage
ImageView myImg = (ImageView) convertView.findViewById(R.id.myimage);
myImg.setImageResource(android.R.drawable.rate_star_big_on);
@ChiaraHsieh
ChiaraHsieh / Sublime Text 2 Markdown Theme Editing.md
Last active December 22, 2015 21:39
Sublime Text 2 markdown syntax highlighting. Add tinkering code segment to your current .tmTheme. Edit the font colors in .tmTheme according to the sector names indicated in the "Markdown Theme Editing.md" gist. (Default color scheme: Green, designed for Phoenix Dark Green - Eighties.tmTheme)

Markup: Heading

Header


The line above is Markdown separator

  • This
  • Is

Configure Markdown Preview for Sublime Text 2

###1. Install Markdown Preview

###2. Set default browser to Google Chrome In Preferences > Package Settings > Markdown Preview > Settings - User

{

"browser": "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"