Posts

· 2019-02-28 · * Cloudflare *

From https://blog.cloudflare.com/introducing-the-workers-cache-api-giving-you-control-over-how-your-content-is-cached/

At Cloudflare, we aim to make the Internet faster and safer for everyone. One way we do this is through caching: we keep a copy of our customer content in our 165 data centers around the world. This brings content closer to users and reduces traffic back to origin servers.

Today (25 Jan 2019), we’re excited to announce a huge change in our how cache works. Cloudflare Workers now integrates the Cache API, giving you programmatic control over our caches around the world.

· 2019-02-28 · * NodeJs *

From https://github.com/websperts/tinypng-cli


#!/usr/bin/env node

var fs = require('fs');
var request = require('request');
var minimatch = require('minimatch');
var glob = require('glob');
var uniq = require('array-uniq');
var chalk = require('chalk');
var pretty = require('prettysize');
· 2019-01-26 · * NodeJs *

Client Codes

  • Core Codes

    public class UploadFile
    {
        public UploadFile()
        {
            ContentType = "application/octet-stream";
        }
    
        public string Name { get; set; }
    
· 2019-01-21 · * Unity *

From https://stackoverflow.com/questions/566462/upload-files-with-httpwebrequest-multipart-form-data

 public static void HttpUploadFile(string url, string file, string paramName, string contentType,
        NameValueCollection nvc)
    {
        Debug.Log(string.Format("Uploading {0} to {1}", file, url));
        string boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x");
        byte[] boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n");

        HttpWebRequest wr = (HttpWebRequest) WebRequest.Create(url);
        wr.ContentType = "multipart/form-data; boundary=" + boundary;
        wr.Method = "POST";
· 2019-01-12 · * Unity *

Graphy is a tool which won Unity 2018 Rewards - Best development tool.

The Debugger:

this component is a powerful feature that allows you to set a number of conditions, that, if met, will start a chain of actions defined by you. It's designed around Debug Packets. Each Debug Packet can have different conditions and actions.

  • Common parameters:
    • Active: If not active, it will be skipped when the debugger checks Debug
      Packets.
    • ID: Optional, but it’s used to operate with Debug Packets from code.
    • Execute once: If true it will only be executed once, then it will delete itself.
    • Init sleep time: Time to wait before checking this Debug Packet.
    • Sleep time after execute: Only applies if “Execute Once” is false. Time to
      wait before checking this Debug Packet after it’s been executed.
· 2018-12-28 · * Unity *
SphericalCoordinate
using System;
using UnityEngine;

namespace UnityToolbag.CoordinateSystems.SphericalCoordinate
{
    public class SphericalCoordinateSystem
    {

        public static SphericalCoordinate FromCartesian(Vector3 v)
        {
· 2018-12-25 · * Unity *

half4 mix(half4 x,half4 y,float a){
	return x * (1-a) + y*a;
}

half3 rgb2hsv(half3 c) 
{ 
	half4 K = half4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); 
	half4 p = mix(half4(c.bg, K.wz), half4(c.gb, K.xy), step(c.b, c.g));
	half4 q = mix(half4(p.xyw, c.r), half4(c.r, p.yzx), step(p.x, c.r)); 
	
	half d = q.x - min(q.w, q.y); 
· 2018-12-23 · * Unity *

General

  • Using a more poweful machine to build with better CPU and better SSD for storing your unity project.
  • Exclude project and target build folders from anti-malware software scans
    • You can improve build times by disabling anti-malware software before building your project. (Testing by Unity Technologies found that build times decreased by 50 – 66% after disabling Windows Defender on a fresh Windows 10 installation.)
  • Put your codes which not often changed to the Plugin directory

New version Unity

· 2018-12-20 · * Bash *
Display Git Branch in bash prompt
git_branch() {
	branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`"
	if [ "${branch}" != "" ];then
		if [ "${branch}" = "(no branch)" ];then
			branch="(`git rev-parse --short HEAD`...)"
		fi
		echo " ($branch)"
	fi
}

export PS1='\[\033[34;34m\]\[email protected]\t\[\033[34;32m\] \w\[\033[00m\]\033[34m$(git_branch)\033[00m \$ '
· 2018-12-18 · * Unity *
using System;
using System.Collections.ObjectModel;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Text;
using UnityEngine;

namespace Assets.PipelineGenerator.Scripts.ESRI.ShapeImporter
{
    /// <summary>
    /// Enumeration defining the various shape types. Each shapefile