Skip to content

Instantly share code, notes, and snippets.

🍣

Hiroki Kokubun cocopon

🍣
View GitHub Profile
@cocopon
cocopon / sass_edge_functions
Last active Dec 14, 2015
Sass functions that extract a specified edge
View sass_edge_functions
// Example:
//
// $padding: 1px 2px 3px;
// top($padding) ...... 1px
// right($padding) .... 2px
// bottom($padding) ... 3px
// left($padding) ..... 2px
@function top($args) {
$len: length($args);
@cocopon
cocopon / Sass::Script::Functions#ms_filter_rgba
Last active Dec 21, 2015
Sass transparent color function for legacy IE (<= 8)
View Sass::Script::Functions#ms_filter_rgba
module Sass::Script::Functions
def ms_filter_rgba(*args)
if args.size == 4
red, green, blue, alpha = args
return ms_rgba(rgb(red, green, blue), alpha)
end
if args.size != 2
raise ArgumentError.new("wrong number of arguments (#{args.size} for 2 or 4")
end
@cocopon
cocopon / GifRecorder.pde
Last active Jun 9, 2019
A class that makes it easy to record a sketch in animated GIF
View GifRecorder.pde
/*
* GifRecorder - makes it easy to record a sketch in animated GIF
* (c) 2014 cocopon.
*/
import gifAnimation.*;
/*
* Usage:
*
* 0. Install a required library before using GifRecorder.
@cocopon
cocopon / Easing.pde
Last active Jun 10, 2020
A class that brings Robert Penner's easing functions into Processing
View Easing.pde
/*
* Easing.pde - brings Robert Penner's easing functions into Processing
* (c) 2015 cocopon.
*
* See the following to learn more about these famous functions:
* http://www.robertpenner.com/easing/
*
* License:
* http://www.robertpenner.com/easing_terms_of_use.html
*/
View Action.pde
/*
* Action.pde
* (c) 2015 cocopon.
*
* License: MIT
*/
import java.util.Arrays;
public class ActionRunner {
@cocopon
cocopon / index.html
Last active Oct 26, 2016
HTML file that causes an error with AtomLinter/linter-tidy
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div>
foobar
</p>
@cocopon
cocopon / Iceberg.terminal
Last active Apr 17, 2020
Iceberg for Terminal.app
View Iceberg.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxARElVO
U1JHQlxOU0NvbG9yU3BhY2VWJGNsYXNzTxAnMC4xMTc2NDcwNTg4IDAuMTI5NDExNzY0
NyAwLjE5NjA3ODQzMTQAEAKAAtIUFRYXWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xv
@cocopon
cocopon / .Xresources
Last active Sep 29, 2019
.Xresources for Iceberg
View .Xresources
! special
*.foreground: #c6c8d1
*.background: #161821
*.cursorColor: #c6c8d1
! black
*.color0: #161821
*.color8: #6b7089
! red
@cocopon
cocopon / 404.txt
Created Dec 30, 2017
404 for colorswat.ch
View 404.txt
::::: ::::::: :::::
:+:+:+ :+: :+: :+:+:+
+:+ +:+ +:+ :+:+ +:+ +:+
+#+ +:+ +#+ + +:+ +#+ +:+
+#+#+#+#+#+ +#+# +#+ +#+#+#+#+#+
#+# #+# #+# #+#
### ####### ###
@cocopon
cocopon / ansi-16-colors.go
Last active Apr 17, 2020
ANSI 16 colors table
View ansi-16-colors.go
package main
import "fmt"
func main() {
fgs := []string{
"39",
"30", "1;30",
"31", "1;31",
"32", "1;32",
You can’t perform that action at this time.