Skip to content

Instantly share code, notes, and snippets.

View saki7's full-sized avatar

Nana Sakisaka saki7

  • Tokyo, Japan
View GitHub Profile
@monokano
monokano / 本当の標準字形に戻す.jsx
Last active April 17, 2024 20:44
Illustratorの選択テキストを本当の標準字形に戻すスクリプト
//Illustratorの選択テキストを本当の標準字形に戻す
var selObj = activeDocument.selection;
if (selObj.length > 0) {
//オブジェクト選択
for (var i = 0; i < selObj.length; i++) {
if (selObj[i] != undefined){
if (selObj[i].typename== "TextFrame") {
var myText = selObj[i].textRange;
@HungryProton
HungryProton / depth_override_shader.gdshader
Last active March 29, 2024 12:45
A Godot 4 shader to make things appear on top of other things within a range.
// A Godot 4 shader to make things appear on top of other things within a range.
// Initially, this was made so my characters' facial features would be rendered on top of their hair.
shader_type spatial;
render_mode unshaded;
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
// Maximum depth we can overdraw relative to the object original depth, in ENGINE UNITS.
@hecomi
hecomi / RtlGetVersion.cpp
Last active October 14, 2021 17:08
Windows の OS のバージョン取得するヤツ
#include <iostream>
#include <Windows.h>
void OutputWindowsInformation()
{
const auto hModule = ::LoadLibrary(TEXT("ntdll.dll"));
if (!hModule) return;
if (const auto address = ::GetProcAddress(hModule, "RtlGetVersion"))
{
@fnky
fnky / ANSI.md
Last active April 26, 2024 16:45
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
javascript:(function(){let url=location.href;let title=document.title;url=encodeURIComponent(url);title=encodeURIComponent(title);window.open('https://twitter.com/intent/tweet?url='+url+'&text='+title,'_blank');})();
@DaEgi01
DaEgi01 / ShadowSettingsAdjuster.cs
Last active May 3, 2023 00:24
Cities Skylines - Shadow Settings Adjuster
using Harmony;
using ICities;
using System;
using System.Reflection;
using UnityEngine;
using UnityEngine.Rendering;
namespace ShadowSettingsAdjuster
{
/// <summary>
@ksasao
ksasao / acc.py
Last active September 12, 2018 14:08
iPhoneで心拍を取るテスト。Pythonista 用。実行すると5秒後から5秒間測定を行います。仰向けになってiPhoneを胸の上に置き、息を止めてじっとしていてください。
'''This script records your device's orientation (accelerometer data) for 5 seconds, and then renders a simple plot of the gravity vector, using matplotlib.'''
import motion
import matplotlib.pyplot as plt
from time import sleep
import console
def main():
@gocarlos
gocarlos / Eigen Cheat sheet
Last active February 11, 2024 14:07
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
@minamorl
minamorl / autofollow.py
Last active July 27, 2016 04:53
gistに直接気持ちで書いたので動くか知らない
import staccato
import time
# must be replaced
consumer_key = "YOURS"
consumer_secret = "YOURS"
access_token_key = "YOURS"
access_token_secret = "YOURS"
TARGET = "username"
SLEEP_TIME = 5