Skip to content

Instantly share code, notes, and snippets.

@zincplusplus
zincplusplus / dabblet.css
Created January 2, 2012 10:34
The -Webkit-scrollbar challenge
/**
* The -Webkit-scrollbar challenge
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Make the first div’s scrollbar like the second’s
* without changing the styling of the div (i.e. you
* can only change the ::-webkit-scrollbar-* rules
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* It doesn't matter if the second div doesn't look the same
* after your changes, it's only there to show you how the
#! /your/favourite/path/to/ruby
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Urabe, Shyouhei
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@jmblog
jmblog / gist:6077993
Last active November 22, 2021 08:37
所得税と住民税の計算方法

所得税(国税)

所得税の計算方法

所得税額 = (所得金額(A) - 所得控除額(B)) × 税率 - 税額控除額(C)

  • 「所得金額(A)- 所得控除額(B)」は 課税所得金額 といい、1,000円未満の端数を切り捨てる。

所得税の税率

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 16, 2026 07:28
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@qnighy
qnighy / gf256.py
Created June 14, 2016 13:01
GF(256) = GF(2^8) = GF(2)[x]/(x^8 + x^4 + x^3 + x + 1)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
class GF256(object):
""" GF(256), defined as GF(2)[x]/(x^8 + x^4 + x^3 + x + 1).
"""
def __init__(self, byteval):
byteval = int(byteval)
@wjmazza
wjmazza / google-sheets-colour-preview.js
Last active October 8, 2025 10:51 — forked from Pathoschild/google-sheets-color-preview.js
A Google Sheets script which adds colour preview to cells. When you edit a cell containing a valid CSS hexadecimal colour code (like #000 or #000000), the background colour will be changed to that colour and the font colour will be changed to the inverse colour for readability.
/*
This script is meant to be used with a Google Sheets spreadsheet. When you edit a cell containing a
valid CSS hexadecimal colour code (like #000 or #000000), the background colour will be changed to
that colour and the font colour will be changed to the inverse colour for readability.
To use this script in a Google Sheets spreadsheet:
1. go to Tools » Script Editor » Spreadsheet;
2. erase everything in the text editor;
3. change the title to "Set colour preview on edit";
@creasty
creasty / Slack theme
Last active February 28, 2023 08:16
#1a1a1a,#444444,#8397a9,#39444d,#303030,#a8a8a8,#a3a46f,#af7070
@ngtk
ngtk / talking_points_when_visiting_companies.md
Last active June 20, 2021 06:29
話を聞きに行くときに訊くこと

話を聞きに行くときに訊くこと

働き方

  • 勤務時間は決まっていますか?
  • メンバーの平均勤務時間帯は何時から何時ですか?
  • リモートは可能ですか?
  • 具体的にどのようなケースでリモートをしていますか?

開発環境

  • 使用するPCは選べる?Macは許容される?アプリケーションは自由に入れられる?
CREATE TEMP FUNCTION parseMessage(messageB64 BYTES)
RETURNS STRING
LANGUAGE js AS """
const toSextet = (ch) => {
if (0x41 <= ch && ch < 0x41 + 26) {
return ch - 0x41;
} else if (0x61 <= ch && ch < 0x71 + 26) {
return ch - (0x61 - 26);
} else if (0x30 <= ch && ch < 0x30 + 10) {
return ch + (52 - 0x30);