Skip to content

Instantly share code, notes, and snippets.

View jhorikawa's full-sized avatar

Junichiro Horikawa jhorikawa

View GitHub Profile
@zeronyk
zeronyk / gist:7dc3c7bd69a5f81c433fbde98bcb43cd
Created October 16, 2023 14:45
ChatGPT-4V easy script for automated visual description
# Start chromium with chromium --remote-debugging-port=9230
# Login on your chromium to chatgpt and navigate to gpt4 (with visual feature)
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
import time
# Set up the webdriver with options
options = Options()
@Dan-Piker
Dan-Piker / Moebius3d
Last active March 27, 2024 08:06
Moebius transformations in 3d
//Moebius transformations in 3d, by reverse stereographic projection to the 3-sphere,
//rotation in 4d space, and projection back.
//by Daniel Piker 09/08/20
//Feel free to use, adapt and reshare. I'd appreciate a mention if you post something using this.
//You can also now find this transformation as a component in Grasshopper/Rhino
//I first wrote about these transformations here:
//https://spacesymmetrystructure.wordpress.com/2008/12/11/4-dimensional-rotations/
//If you want to transform about a given circle. Points on the circle and its axis stay on those curves.
//You can skip these 2 lines if you want to always use the origin centred unit circle.
@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 1, 2024 09:43 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@Ethan-VisualVocal
Ethan-VisualVocal / ForceLandscape.cs
Last active February 15, 2019 00:28
Workaround for Unity set Screen.orientation bug on iOS 10.
using UnityEngine;
using System.Collections;
// This is used to workaround https://issuetracker.unity3d.com/issues/ios-changing-the-screen-orientation-via-a-script-sometimes-results-in-corrupted-view-on-ios-10
// Bug shows screen in portrait with content rotated 90 offscreen. Caused by explicitly setting Landscape orientation on iOS 10.
//
// On iOS this just switches to LandscapeLeft, back to Portrait, and then back to LandscapeLeft, which seems to work.
// SUGGESTION: blank out the screen before executing this, since the screen jumps around as it switches back and forth.
public class ForceLandscape : MonoBehaviour
{
@dpogue
dpogue / xcode8.js
Last active March 21, 2018 15:38
Hook for Cordova iOS to support "developmentTeam" in buildConfig.json
"use strict";
var fs = require('fs');
var path = require('path');
module.exports = function(context) {
var encoding = 'utf-8';
var filepath = 'platforms/ios/cordova/build.xcconfig';
if (context.opts.cordova.platforms.indexOf('ios') === -1) return;
@erycson
erycson / LLtoUTM.cs
Created February 18, 2016 16:13
Converting latitude and longitude to UTM using ProjNet
/*
* LL to UTM Converter
* Copyright (C) 2016 Érycson Nóbrega <egdn2004@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@thorikawa
thorikawa / japanese.txt
Last active March 8, 2022 00:07
日本語の文字コード範囲指定(ascii・ひらがな・カタカナ・頻出漢字)
32-128,12288-12543,12448-12543,65280-65519,19968,19971,19977,19978,19979,20013,20061,20108,20116,20154,20241,20808,20837,20843,20845,20870,20986,21147,21313,21315,21475,21491,21517,22235,22303,22805,22823,22825,22899,23376,23383,23398,23567,23665,24029,24038,24180,25163,25991,26085,26089,26376,26408,26412,26449,26519,26657,26862,27491,27671,27700,28779,29356,29577,29579,29983,30000,30007,30010,30333,30334,30446,30707,31354,31435,31481,31992,32819,33457,33609,34411,35211,35997,36196,36275,36554,37329,38632,38738,38899,19975,20024,20132,20140,20170,20250,20307,20309,20316,20803,20804,20809,20844,20869,20908,20992,20998,20999,21069,21271,21320,21322,21335,21407,21451,21476,21488,21512,21516,22238,22259,22269,22290,22320,22580,22768,22770,22799,22806,22810,22812,22826,22969,22985,23460,23478,23546,23569,23721,24037,24066,24112,24195,24215,24339,24341,24351,24369,24375,24403,24418,24460,24515,24605,25144,25165,25945,25968,26032,26041,26126,26143,26149,26172,26178,26228,26332,26360,26397,26469,26481,27005,27468,274
@paperdarwin
paperdarwin / runnodejs.sh
Last active January 21, 2016 08:28
run a nodejs app even after you logout from ssh
nohup node app &
# to kill it execute ps -ef
# find the process id for "node app " and then
# kill -9 <process id>
using UnityEngine;
using System.Collections;
using System;
public class Math3d : MonoBehaviour {
private static Transform tempChild = null;
private static Transform tempParent = null;
public static void Init(){
@zardoru
zardoru / fixed_converter
Last active July 13, 2016 14:01
Stepmania converter to osu!mania in c#. fixed a few bugs.
/* use this one. github is not cooperating. */
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
/* god my c# is so messy.
* I'm not fond of proper C#. I rather like C, really
*/