Skip to content

Instantly share code, notes, and snippets.

View supertask's full-sized avatar
🏖️
Chilling

Tasuku TAKAHASHI supertask

🏖️
Chilling
View GitHub Profile
sudo mv ○○.sty /usr/local/texlive/texmf-local/tex/latex/○○
sudo mkxisr
@supertask
supertask / Setting Opencv for Python
Created January 28, 2016 03:06
Setting Opencv for Python
sudo port install opencv +python27
/opt/local/bin/python2.7
@supertask
supertask / find_real_address.py
Created March 4, 2016 06:35
A script finding a real address from ip address.
import geoip2.database
reader = geoip2.database.Reader('/usr/local/share/Geoip/GeoLite2-City.mmdb')
import sys
ip_address = raw_input('ip address -> ')
response = reader.city(ip_address)
print "%s, %s, %s" % (response.country.name, response.subdivisions.most_specific.name, response.city.name)
@supertask
supertask / demo.unit
Last active March 13, 2016 22:29
This file is A demo of UnitX language.
飛行機代 = 10{万円} * 2{往復}
rep (i,[{月},{年}]) {
>> 学校代 = 5{万円/月->i}
>> お泊まり代 = 6{万円/月->i}
>> 飛行機代
>> 計 = 飛行機代{万円} + (学校代 + お泊まり代){万円}
---
}
@supertask
supertask / csv_exporter.gs
Last active June 15, 2023 04:22
スプレッドシートの複数のシートを複数のCSVにエクスポートするGASファイル.
/*
* スプレッドシートの複数のシートを複数のCSVにエクスポートする.
* マイドライブに置かれる.
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
@supertask
supertask / tokyo_north_star_meetup_2.csv
Last active February 3, 2019 09:53
2nd Tokyo Project North Star Meetup
Time Content / Presenter
18:30 - Reception
19:00 - Venue and event guide
19:10 - 19:40 6DoF Project North Star using Windows MR by Yamaura(tw: @yamaulab) at exiii
19:40 - 20:10 Make AR HMD by Dabu(tw: @troll01234)
20:10 - 20:25 The first exhibition of a custum north star by Hirano, Iwanaka, Nakanishi(tw: @skckmdtk2m) at 1-10,inc
20:25 - 20:40 How to make apps, Discord community, Tips by Task(tw: @supertask_jp) at teamLab
20:40 - 22:00 Trial session and networking
@supertask
supertask / check_status.py
Created June 28, 2019 02:54
Checking status codes of URL paths
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Requirements:
# Command:
# python3
# Python library(pip):
# requests
# urllib3
# File: checking_urls.txt
@supertask
supertask / Culling_Off.shader
Last active January 27, 2020 17:14
A part of Culling_Off.shader on Project North Star
void surf (Input IN, inout SurfaceOutput o) {
fixed4 tex = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = 0.0;
o.Gloss = 0.0;
o.Alpha = 1.0;
o.Specular = 0.0;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
o.Emission = tex.rgb;
}
v2f vert_inflation(appdata v) {
v2f o;
v.vertex = LeapGetLateVertexPos(v.vertex, _isLeftHand); // late-latch support
o.vertex = UnityObjectToClipPos(v.vertex + float4(_InflationAmount * v.normal, 0));
return o;
}
fixed4 frag(v2f i) : SV_Target{
return _Color;
}
@supertask
supertask / debugComputeBuffer.cs
Last active April 22, 2022 03:56
Debug compute buffer
//
// Debug Compute Buffer
// When you define a struct/class,
// please use override ToString(), public override string ToString() => $"MpmParticle(position={position}, velocity={velocity})";
//
// debugging range is startIndex <= x < endIndex
// example:
// Util.PrintBuffer<uint2>(this.particlesBuffer, 1024, 1027);
//
public static void PrintBuffer<T>(ComputeBuffer buffer, int startIndex, int endIndex) where T : struct