Skip to content

Instantly share code, notes, and snippets.

@ishitcno1
ishitcno1 / default.yaml
Created January 22, 2015 03:27
rime config
# Rime default settings
# vim: set sw=2 sts=2 et:
# encoding: utf-8
config_version: "0.13"
schema_list:
- schema: wubi_pinyin
switcher:
@ishitcno1
ishitcno1 / proguard.txt
Created December 17, 2014 08:36
android proguard example
# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
@ishitcno1
ishitcno1 / build.gradle
Last active August 29, 2015 14:11
android build.gradle example
// main app code
apply plugin: 'com.android.application'
repositories {
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
android {
compileSdkVersion 21
public class RainbowTextView extends TextView {
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
int[] rainbow = getRainbowColors();
Shader shader = new LinearGradient(0, 0, 0, w, rainbow,
null, Shader.TileMode.MIRROR);
Matrix matrix = new Matrix();
matrix.setRotate(90);
@ishitcno1
ishitcno1 / WidgetUtils.java
Created October 28, 2014 14:32
android widget utils
public class WidgetUtils {
/**
* create alert dialog
*
* @param context
* @param layout
* @param showSoftInput
* @return
*/
public static AlertDialog createAlertDialog(Context context, int layout, boolean showSoftInput) {
@ishitcno1
ishitcno1 / swap-caps.sh
Created October 24, 2014 11:38
swap caps and left ctrl on lubuntu
#!/bin/sh
setxkbmap -option ctrl:swapcaps
@ishitcno1
ishitcno1 / run.sh
Created October 24, 2014 11:24
run after install lubuntu 14.04 to install software
#!/bin/sh
# install softwares after install lubuntu
sudo apt-get install git vim terminator ibus-rime librime-data-wubu arandr gimp
@ishitcno1
ishitcno1 / index.html
Created October 16, 2014 09:16
impress.js index.html backbone
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link href="css/normalize.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
</head>
<body>
<div id="impress">
@ishitcno1
ishitcno1 / style.css
Last active August 29, 2015 14:07
impress.js custom style css
body {
font-family: sans-serif;
line-height: 1.5;
font-size: 48px;
background: #333333;
background: -webkit-radial-gradient(center bottom, circle farthest-corner, #666666, #333333, black);
background: -moz-radial-gradient(center bottom, circle farthest-corner, #666666, #333333, black);
background: -o-radial-gradient(center bottom, circle farthest-corner, #666666, #333333, black);
background: -ms-radial-gradient(center bottom, circle farthest-corner, #666666, #333333, black);
@ishitcno1
ishitcno1 / index.html
Created October 16, 2014 01:18
character padawan from impress.js
<!--
Welcome to the light side of the source, young padawan.
One step closer to learn something interesting you are...
____
_.' : `._
.-.'`. ; .'`.-.
__ / : ___\ ; /___ ; \ __