Skip to content

Instantly share code, notes, and snippets.

View SuzanaK's full-sized avatar

Suzana K. SuzanaK

View GitHub Profile
@mbostock
mbostock / .block
Last active July 22, 2018 01:18
Transform Transitions
license: gpl-3.0
@mbostock
mbostock / .block
Last active April 6, 2023 11:58
Epicyclic Gearing
license: gpl-3.0
redirect: https://observablehq.com/@mbostock/epicyclic-gearing
@mattbaker
mattbaker / README
Created December 22, 2011 06:02
SVG to PNG render with Node and D3.js
This example expects to have d3.min.js and d3.layout.min.js in the same directory as pie.js and pie_serv.js.
Run with node pie_serv.js
@donpark
donpark / perlincanvas.js
Created February 11, 2012 04:45
Rendering Perlin Noise Fast to HTML5 Canvas
/* Following canvas-based Perlin generation code originates from
* iron_wallaby's code at: http://www.ozoneasylum.com/30982
*/
function randomNoise(canvas, x, y, width, height, alpha) {
x = x || 0;
y = y || 0;
width = width || canvas.width;
height = height || canvas.height;
alpha = alpha || 255;
var g = canvas.getContext("2d"),
@lunohodov
lunohodov / ral_classic.csv
Last active April 24, 2024 01:14
RAL Classic color table (CSV)
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 11 columns, instead of 4. in line 9.
RAL,RGB,HEX,CMYK,LRV,English,German,French,Spanish,Italian,Dutch
RAL 1000,205-186-136,#CDBA88,0-9-34-20,51.79,Green beige,Grünbeige,Beige vert,Beige verdoso,Beige verdastro,Groenbeige
RAL 1001,208-176-132,#D0B084,0-15-37-18,48.09,Beige,Beige,Beige,Beige,Beige,Beige
RAL 1002,210-170-109,#D2AA6D,0-19-48-18,45.07,Sand yellow,Sandgelb,Jaune sable,Amarillo arena,Giallo sabbia,Zandgeel
RAL 1003,249-169-0,#F9A900,0-32-100-2,49.05,Signal yellow,Signalgelb,Jaune de sécurité,Amarillo señales,Giallo segnale,Signaalgeel
RAL 1004,228-158-0,#E49E00,0-31-100-11,42.13,Golden yellow,Goldgelb,Jaune or,Amarillo oro,Giallo oro,Goudgeel
RAL 1005,203-143-0,#CB8F00,0-30-100-20,34.15,Honey yellow,Honiggelb,Jaune miel,Amarillo miel,Giallo miele,Honinggeel
RAL 1006,225-144-0,#E19000,0-36-100-12,37.45,Maize yellow,Maisgelb,Jaune maïs,Amarillo maíz,Giallo polenta,Maisgeel
RAL 1007,232-140-0,#E88C00,0-40-100-9,37.63,Daffodil yellow,Narzissengelb,Jaune narcisse,Amarillo narciso,Giallo narciso,Narcissengeel
RAL 1011,175-128-80,#AF8050,0-27

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@luigi
luigi / counter.rb
Last active October 27, 2015 00:24
Calculate the percentage of tweets linking to a website that came from the Tweet button
#
# Before running:
# $ gem install twitter
#
# Register a Twitter application to get auth credentials:
# https://dev.twitter.com/apps
#
# To run:
# $ ruby counter.rb upworthy.com 500
#
@0robustus1
0robustus1 / gitignore
Last active October 13, 2015 06:28
LaTeX-specific gitignore
# Self
.gitignore
# Mac OS X
.DS_Store
# LaTeX
*.acn
*.acr
*.alg
anonymous
anonymous / gist:4169590
Created November 29, 2012 14:57
Get Google Spreadsheet as PDF with customizations
function spreadsheetToPDF(key) {
var oauthConfig = UrlFetchApp.addOAuthService("spreadsheets");
var scope = "https://spreadsheets.google.com/feeds"
oauthConfig.setConsumerKey("anonymous");
oauthConfig.setConsumerSecret("anonymous");
oauthConfig.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope="+scope);
oauthConfig.setAuthorizationUrl("https://accounts.google.com/OAuthAuthorizeToken");
oauthConfig.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken");
@bombless
bombless / gist:4286560
Created December 14, 2012 16:10
Python YUV2RGB & RGB2YUV
def RGB2YUV(input):
(R, G, B) = input
Y = int(0.299 * R + 0.587 * G + 0.114 * B)
U = int(-0.147 * R + -0.289 * G + 0.436 * B)
V = int(0.615 * R + -0.515 * G + -0.100 * B)
return (Y, U, V)
def YUV2RGB(input):
(Y, U, V) = input