Skip to content

Instantly share code, notes, and snippets.

@ckrissun
ckrissun / 20-noto-cjk.conf
Created January 11, 2017 01:45 — forked from mrjohannchang/20-noto-cjk.conf
.config/fontconfig/conf.d/20-noto-cjk.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
@ckrissun
ckrissun / TimeUtils.m
Last active January 3, 2016 09:24
ios: get days between two timestamps
#import "TimeUtils.h"
/*
//TimeUtils.h
#import <Foundation/Foundation.h>
@interface TimeUtils : NSObject
+ (NSInteger)numberOfDaysByDate:(NSDate *)startDate endDate:(NSDate *)endDate;
@ckrissun
ckrissun / build-ffmpeg-for-ios.md
Last active January 3, 2016 06:35
build ffmpeg for ios
@ckrissun
ckrissun / build-ffmpeg.sh
Created January 2, 2016 01:17 — forked from m1entus/build-ffmpeg.sh
Installing ffmpeg ios libraries armv7, armv7s, i386
#!/bin/bash
###########################################################################
# Choose your ffmpeg version and your currently-installed iOS SDK version:
#
VERSION="2.0.2"
SDKVERSION="7.0"
ARCHS="armv7 armv7s i386"
#
#
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
# Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4
# See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks
# And here: http://forums.macrumors.com/showthread.php?t=1410459
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>DejaVu Serif</family>
<family>Bitstream Vera Serif</family>
<family>Droid Serif</family>
<family>AR PL UMing CN</family>
@ckrissun
ckrissun / rdm-build-error.md
Created September 7, 2014 07:43
redis-desktop-manager0.7.6 build error on debian jeesie

when building redis-desktop-manager0.7.6:

source/application.cpp:243:19: error: ‘bad_cast’ in namespace ‘std’ does not name a type } catch (std::bad_cast &exception) {

fixes can be found here

https://svn.boost.org/trac/boost/ticket/2483
@ckrissun
ckrissun / qt5-redis-desktop-manager
Last active August 29, 2015 14:06
qt5.1.1: redis desktop manager
./configure -opensource -release -static -qt-libpng -qt-libjpeg -qt-xcb -qt-xkbcommon -no-kms -no-opengl -openssl-linked -nomake examples -nomake tests -v -skip webkit -skip multimedia -skip declarative -confirm-license
make
sudo make install
gem sources --remove http://rubygems.org/ #删除源
gem sources -a http://ruby.taobao.org/ #添加淘宝源
gem sources -l #查看已有的源,确保只有淘宝的源就行了
@ckrissun
ckrissun / IdeaIC.desktop
Last active August 29, 2015 14:06
@http://ezzata.wordpress.com/2012/09/19/how-to-install-intellij-idea-on-linux/
[Desktop Entry]
Encoding=UTF-8
Name=intellj IDEA
Comment=Intellij IDEA IDE
Exec=IDEA
Icon=/opt/idea-IC-117.798/bin/idea.png
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true