Skip to content

Instantly share code, notes, and snippets.

Yu-Cheng Chuang chitsaou

Block or report user

Report or block chitsaou

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Podcasts.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>iTunes Subscribed Feeds</title>
<dateCreated>Fri, 03 Mar 2017 08:41:34 GMT</dateCreated>
<dateModified>Fri, 03 Mar 2017 08:41:34 GMT</dateModified>
</head>
<body>
<outline text="硬影像" type="rss" xmlUrl="http://ipn.li/hardimage/feed" htmlUrl="https://ipn.li/hardimage/" />
<outline text="一天世界" type="rss" xmlUrl="http://ipn.li/yitianshijie/feed" htmlUrl="https://ipn.li/yitianshijie/" />
@chitsaou
chitsaou / hdmi.md
Last active Mar 5, 2018
Raspberry Pi with HDMI Switch
View hdmi.md

For some HDMI switches (e.g. ATEN), to make HDMI hot plugging work well with Raspberry Pi, set the following in /boot/config.txt:

hdmi_force_hotplug=1 # always output HDMI even if not plugged in
hdmi_drive=2         # always output audio to HDMI
hdmi_group=1         # use CET mode (compatible with TV)
hdmi_mode=16         # use 1080p; otherwise it may switch to SD resolution

References:

@chitsaou
chitsaou / README.md
Last active Mar 1, 2016
CJSX (CoffeeScript + JSX) to ES6
View README.md

(Not) CJSX to ES6 converter

It does noly convert a small set of codes into ES6. You sill need to edit the file.

Usage

find ./components -name "*.cjsx" -exec ./converter.sh {} \;
@chitsaou
chitsaou / Pie.jsx
Last active Sep 3, 2015
Pie progress component for React
View Pie.jsx
var Pie = React.createClass({
defaultProps: {
percentage: 0
},
calculateAngle: function(percentage) {
return (percentage) * (360 / 100);
},
render: function() {
var angle = this.calculateAngle(this.props.percentage);
View colors.txt
http://paletton.com/
(present = Full Colors)
Lightest Lighter Base Darker Darkest Hue ~=
#FF6363 #FF3939 #FF0000 #C50000 #9B0000 R 0
#FFA863 #FF9139 #FF7100 #C55700 #9B4500 RO 30
#FFCB63 #FFBD39 #FFAA00 #C58300 #9B6700 O 60
#FFE463 #FFDD39 #FFD300 #C5A300 #9B8000 OY 90
@chitsaou
chitsaou / README.md
Last active Aug 21, 2019
Proxy to remote server with CORS support
View README.md

cors.py for mitmproxy

Hacking CORS restriction to enable in-browser XHR to any server.

Usage

Say you are running an web app at localhost, and you want to send XHR to http://remote-server:80, but the CORS restriction forbids access because you are sending requests from an origin that remote-server:80 does not allow.

Run:

@chitsaou
chitsaou / css_resources.md
Last active Aug 29, 2015 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.
View css_resources.md

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@chitsaou
chitsaou / rails_resources.md
Last active Aug 18, 2017 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.
View rails_resources.md

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@chitsaou
chitsaou / javascript_resources.md
Last active Aug 18, 2017 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
View javascript_resources.md

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
You can’t perform that action at this time.