Skip to content

Instantly share code, notes, and snippets.

@yin8086
yin8086 / parseVCard.py
Last active November 18, 2023 04:46
VCard process to get the person who has phone numbers
# -*- coding: utf-8 -*-
import vobject, sys, codecs
from os import path
def hasTel(lineList):
for line in lineList:
if line[:len('TEL;')] == 'TEL;':
return True
return False
@yin8086
yin8086 / etc2_export.py
Created March 8, 2016 18:23
arm etc2(Ericsson Texture Compression, Unity asset) to png, and png to etc2, use official `etcpack.exe` from [Mali GPU Texture Compression Tool](http://malideveloper.arm.com/resources/tools/mali-gpu-texture-compression-tool/)
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 07 00:55:12 2016
@author: Stardrad
"""
import os, struct, fnmatch, time
from PIL import Image
@yin8086
yin8086 / ImageExport.py
Last active November 18, 2023 03:49
SeitokaiNoichizonLv2_Crack
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 16 10:07:25 2014
@author: Stardrad
"""
import time, struct, os, fnmatch
from cStringIO import StringIO
import gzip
@yin8086
yin8086 / astc_export.py
Last active November 18, 2023 03:31
arm astc(Adaptive Scalable Texture Compression, Unity asset) to png, and png to astc, use official `astcenc.exe`
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 15 15:53:10 2015
@author: Stardrad
astcenc.exe: https://www.dropbox.com/s/u5w6d972nniursu/ASTC-Evaluation-Codec-1.3.zip?dl=0
"""
import os, struct, fnmatch, time, math
@yin8086
yin8086 / notepadRemoveLine.md
Created November 13, 2016 14:46
notepad++ remove odd even lines regex

notepad++ remove odd even lines regex

# remove even lines
([^\r\n]*\R)[^\r\n]*\R?
\1
# remove odd lines
@yin8086
yin8086 / PrintUnity3dType.cs
Created April 22, 2016 03:25
Unity3d Texture Type Descriptions.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestUnityConsole
{
class Program
{
@yin8086
yin8086 / aegisub32_note_Chinese.md
Created May 22, 2016 14:13
Aegisub32 Lua Script学习笔记(官方文档翻译总结)

Aegisub32 Lua Script学习

一、整体结构

1. 全局变量——描述脚本元数据

  • script_name
  • script_description
  • script_author
  • script_version

2. 脚本功能——均可包含0个一个或者多个

@yin8086
yin8086 / gunicorn.sh
Created November 22, 2012 16:10 — forked from suda/gunicorn
Gunicorn init.d script (debian/ubuntu/centos/redhat)
#!/bin/sh
# chkconfig: 2345 55 45
# description: start or stop gunicorn
# chkconfig –add gunicorn in centos and redhat
# update-rc.d gunicorn defaults in debian and ubuntu
### BEGIN INIT INFO
# Provides: gunicorn
# Required-Start: $all
@yin8086
yin8086 / aegisub_note_chinese.md
Created May 22, 2016 14:14
Aegisub32 Lua Script学习笔记(官方文档翻译总结)

Aegisub32 Lua Script学习

@(日常笔记)

一、整体结构

1. 全局变量——描述脚本元数据

  • script_name
  • script_description
  • script_author
  • script_version
@yin8086
yin8086 / fixPMF.py
Created July 11, 2013 02:28
Use {filename:time} dictionary fix the timestamp in pmf file
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 11 09:50:16 2013
@author: Stardrad Yin
"""
import os, fnmatch, struct
timeDic = {'mv00':89, 'mv04':67, 'mv05':102, 'mv06':29, 'mv07':27,\
'mv08':34, 'mv10':21, 'mv12':21}