Skip to content

Instantly share code, notes, and snippets.

@1m38
1m38 / kicad_arrange_keys.py
Last active September 9, 2020 00:45
KiCad Pcbnewでキースイッチを角度・相対位置指定で配置するサンプル
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
import pcbnew
import math
pcb = pcbnew.GetBoard()
class MyPosition(object):
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active November 17, 2024 14:13
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@mtei
mtei / keyboard_soldering_videos.md
Last active February 11, 2019 17:47
keyboard soldering sample video

キーボードのハンダ付け動画一覧

@ryusas
ryusas / test_falloffCurveAttr.py
Last active November 4, 2024 09:36
A test for Maya's falloffCurveAttr control and attribute.
import maya.cmds as cmds
import maya.mel as mel
cmds.group(em=True)
cmds.addAttr(at='float2', ln='testFCurve', m=True)
cmds.addAttr(at='float', ln='testFCurvePosition', p='testFCurve', dv=-1)
cmds.addAttr(at='float', ln='testFCurveValue', p='testFCurve', dv=-1)
cmds.setAttr('.testFCurve[0]', 0, 0)
cmds.setAttr('.testFCurve[1]', .5, 0)
cmds.setAttr('.testFCurve[2]', .5, 1)
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
xcargs = ""
xcargs += " IDEBuildOperationMaxNumberOfConcurrentCompileTasks=16"
xcargs += " GCC_GENERATE_DEBUGGING_SYMBOLS=NO DEBUG_INFORMATION_FORMAT=dwarf"
xcargs += " ONLY_ACTIVE_ARCH=YES VALID_ARCHS=arm64"
xcargs += " CC=\"ccacheclang\" GCC_PRECOMPILE_PREFIX_HEADER=NO" if File.exist?("/usr/local/bin/ccacheclang")
@mtei
mtei / helix_keyboard_build_tool_memo.md
Last active August 24, 2023 08:19
キーボード自作、特に Helix キーボードキットの製作に最低必要な工具のメモ
@tm8r
tm8r / embed_test.py
Last active August 23, 2024 11:37
Mayaでシーンファイルに情報を埋め込む
from maya import cmds
print(cmds.fileInfo("custom_note",q=True))
cmds.fileInfo("custom_note", "test")
print(cmds.fileInfo("custom_note",q=True))
# fileInfoだけ変更したのちにFile>SaveSceneを実行すると変更なしと判定されるので、差し支えなければcmds.fileで強制的に保存した方が良い
cmds.file(save=True)
# result:
# []
# [u'test']
@tm8r
tm8r / konami_command.py
Last active December 2, 2017 08:04
Mayaでコナミコマンド
# -*- coding: utf-8 -*-
u"""KonamiCommand"""
from __future__ import absolute_import, division, print_function
from Qt import QtGui, QtWidgets
from maya.app.general.mayaMixin import MayaQWidgetBaseMixin
import time