Skip to content

Instantly share code, notes, and snippets.

@andreiagmu
andreiagmu / MToonToRealToonShaderSwapper.cs
Last active March 6, 2023 06:01
MToon to RealToon Shader Swapper for Unity
// MToon to RealToon Shader Swapper for Unity
// by Andy Miira (Andrei Müller), October 2019
//
//
// [IMPORTANT]
// You must add the file RenderPipelineHelper.cs to your project, linked below:
// https://gist.github.com/andreiagmu/b862ae47ef91be05f61ae2da26627a01
//
//
// [INSTRUCTIONS]
@nkjzm
nkjzm / VRoidAccountSupporter.cs
Created January 29, 2019 11:40
VRoid SDKでアカウント周りのデバッグを支援するスクリプト。Editorフォルダ以下に入れると動作。CC0
using System.IO;
using UnityEditor;
using UnityEngine;
public class VRoidAccountSupporter
{
[MenuItem("Tools/VRoid/ResetAccount")]
static void ResetAccount()
{
File.Delete(Path.Combine(Application.persistentDataPath, "production_account"));
@rummelonp
rummelonp / faraday.md
Last active May 20, 2022 12:23
Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

API ラッパの開発には [RestClient gem][rest_client_gem] だとか
OAuth の必要なものは [Net/HTTP][net_http] + [OAuth gem][oauth_gem] を使ってた

[Twitter gem][twitter_gem] や [Instagram gem][instagram_gem] など API ライブラリのソースを読んでみると
[Faraday gem][faraday_gem] というものがよく使われてた

class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
# server.status.** にマッチして、alerts. と mongo. の2箇所に再emitする
<match server.status.**>
type route
remove_tag_prefix server.status
<route **>
add_tag_prefix alerts
copy # alertsはコピー
</route>
<route *.*>
@ChristianPeters
ChristianPeters / css_splitter.rake
Created August 8, 2011 10:22
Split CSS files so that there are no more than a given number of selectors in one style sheet. This is a tool to cope with Internet Explorer's limitation of max. 4095 selectors per stylesheet.
require 'rake'
require 'css_splitter'
desc 'split css files'
namespace :css do
task :split do
infile = ENV['infile'] || raise("missing infile")
outdir = ENV['outdir'] || File.dirname(infile)
max_selectors = ENV['max_selectors'] || 4095
@hotchpotch
hotchpotch / cocproxy.nginx.conf
Created May 25, 2011 04:50
cocproxy for nginx
#!nginx -p . -c cocproxy.nginx.conf
error_log /dev/stderr debug;
daemon off;
events {
worker_connections 48;
}
http {