This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2023 Taiga Takano | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http:#www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* @file server.js | |
* @copyright © 2018 By Logue <http://logue.be/>. | |
* @license MIT | |
*/ | |
const http = require("http"); | |
const fs = require('fs'); | |
function getType(_url) { | |
const types = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. | |
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ | |
// or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading; | |
using UnityEngine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 120 | |
uniform sampler2DRect tex0; | |
uniform sampler2DRect foreground; | |
varying vec2 texCoordVarying; | |
void main() | |
{ | |
vec4 bgtex = texture2DRect(tex0, texCoordVarying); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2016 Keizo Nagamine | |
Released under the MIT license | |
http://opensource.org/licenses/mit-license.php | |
*/ | |
using UnityEngine; | |
using UnityEngine.Networking; | |
using System.Collections; | |
using System.Xml.Serialization; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MovingAverageFilter extends PIXI.AbstractFilter { | |
static fragmentSrc(size: number, width: number, height: number, direction: string) { | |
return ` | |
precision lowp float; | |
varying vec2 vTextureCoord; | |
varying vec4 vColor; | |
uniform sampler2D uSampler; | |
void main(void) | |
{ | |
gl_FragColor = vec4(0.0); |
esprima系統のtoolはどれも自分の仕事領域を綺麗に分割していて,
- esprima
- codeを受け取って, Parser API ASTを返す(tree)
- escodegen
- ASTを受け取って, 適切なcodeに変換する
- この時, codegenの職務の一つとして, codeの意味を変えない形での圧縮も可能 (spaceやindentの削除など)
- esmangle
- ASTを受け取って, 変数名の短縮, true / falseなどを!0 / !1に変換したりなどして圧縮したASTを返す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================================== | |
Setting up Nginx, uWSGI and Python3 | |
====================================== | |
First off, I'm traditionally a PHP developer, but am looking at moving across to Python. I really struggled to find decent documentation on how to get a server up and running for deploying Python web applications from the point of view of someone coming from PHP. The main problems I came across with documentation were: | |
1) Only showed you how to run the server for a single web application. | |
2) Only showed you how to configure the app, not the server it was running on. | |
My preferred workflow for development is by setting up a new VM in VMware Fusion and then forwarding through all requests to that VM via /etc/hosts. This might not be the optimal way to get things up and running, but it works for me. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ported from Stefan Gustavson's java implementation | |
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
// Read Stefan's excellent paper for details on how this code works. | |
// | |
// Sean McCullough banksean@gmail.com | |
/** | |
* You can pass in a random number generator object if you like. | |
* It is assumed to have a random() method. | |
*/ |
NewerOlder