Skip to content

Instantly share code, notes, and snippets.

#go to folder:
/Applications/Adobe Photoshop CS6/Locales/pt_BR/Support Files/tw10428.dat
#rename the file tw10428.dat for tw10428.bak
@cnsoft
cnsoft / unity3d_360sdk.txt
Created February 11, 2014 09:57
unity3d + 360
官方的文档看的有点迷糊, 我现在u3d android 编译OK,在Temp->StagingArea有android的编译后的android相关的文件, 然后是在eclipse下新建个android的工程保持与unity3d相关设置一样,把360sdk jar包和unity3d class.jar导入到新建工程lib里吗? 然后编译成jar包再导入unity3d工程里??? 就说流程是否如同unity3d 接91 sdk for android差不多? 回帖推荐 紫夜行者 查看楼层 1.修改Android工程和Unity工程,保持包名、版本一致。设置Company Name、ProductName等。 Q: 此android工程是自己新建的工程,保持包名,版本一致?还是unity3d 编译后在temp->StagingArea临时生成android工程,直接eclipse导入该工程? 2.复制Unity类库到Android工程,编译Android工程,导入jar包到Unity工程\Assets\Plugins\Android\bin下 Q: 是将u3d bin下 class.jar 和 plugins 下所有jar包导入到android工程? 3.后面直 ...
http://bbs.360safe.com/thread-3375903-1-1.html
@cnsoft
cnsoft / DL.sh
Created February 20, 2014 03:41 — forked from schnabear/DL.sh
#!/bin/bash
while read link; do if [ ! -f "$(basename $link)" ]; then wget $link; fi; done < GDMAG.txt
#!/usr/bin/python
#
# This code generates heat maps. Given a list of 2D positions and a background image, this code
# generates clusters of positions, colors them by intensity, and blends them with the background
# image.
#
# This code has the following dependencies:
# * spot.png - A radial gradient used to mark individual heat points.
# * colors.png - An image describing the range of colors to map to heat intensity.
#
#
# This config file is a combination of ideas from:
# http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy
# http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/
# http://wiki.railsmachine.com/HAProxy
# http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/
# http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/
# http://wiki.railsmachine.com/HAProxy
# http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9
#
resolver 8.8.8.8;
location /video/ {
if ($request_uri ~ "^/video/(.+?)/.+") {
set $upstream_host $1.googlevideo.com;
add_header Content-Disposition "attachment; filename=video.mp4;";
}
rewrite /video/.+?/(.+)$ /$1 break;
proxy_buffering off;
proxy_pass https://$upstream_host;
proxy_set_header Host $upstream_host;
@cnsoft
cnsoft / json_export.py
Created May 26, 2014 14:53
export some item from one json file to new file.
import json
import codecs
#open the source file
json_file = open('map.txt','r')
data = json_file.read()
datas = json.loads(data.decode("utf-8" ) )
#data1 = json.loads(json_file.read())#.decode('utf-8') )
# data.decode("utf-8-sig"))
#print data
@cnsoft
cnsoft / blogpost.md
Last active August 29, 2015 14:15 — forked from coryalder/blogpost.md

Save books out of Safari Books Online

From http://objectivesea.tumblr.com/post/9033067018/safaribooks

This is hard. I spent way too much time figuring this out, because I was annoyed that a book I bought (Addison-Wesley) was available online for free, except only for 45 days after which payment was required. So I made this hack... probably useful to no one else, but here it is.

Requirements:

  1. iPad.
  2. Safari To Go (the Safari Books Online iPad app).
@cnsoft
cnsoft / RiakHttp10k.txt
Created June 27, 2012 15:39 — forked from toastdriven/RiakHttp10k.txt
Benching Riak's performance with the Python client.
[daniel@Europa:Desktop]: python riak_test.py
Inserting 0
Inserting 1000
Inserting 2000
Inserting 3000
Inserting 4000
Inserting 5000
Inserting 6000
Inserting 7000
Inserting 8000
@cnsoft
cnsoft / ClippedSprite.as
Created November 20, 2012 08:20 — forked from PrimaryFeather/ClippedSprite.as
Simple Sprite subclass with a rectangular mask in stage coordinates
package starling.extensions
{
import flash.display3D.Context3D;
import flash.geom.Point;
import flash.geom.Rectangle;
import starling.core.RenderSupport;
import starling.core.Starling;
import starling.display.DisplayObject;
import starling.display.Sprite;