Skip to content

Instantly share code, notes, and snippets.

View mainiak's full-sized avatar

Jakub Viták mainiak

View GitHub Profile
@fczbkk
fczbkk / get-random-string.js
Created March 25, 2013 12:29
Generates a random string and returns them or sends it to callback. Great for generating unique identifiers.
/*
Has two optional options parameters:
- length - 8 characters by default
- characters - upper- and lowercase characters and numbers by default
*/
function getRandomString(options, callback) {
options = options || {};
options.length = options.length || 8;
options.characters = options.characters || '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
@fczbkk
fczbkk / ajax.js
Created March 25, 2013 07:06
Minimalist AJAX function for the most basic calls. Only supports GET method. Loads given url and sends result to the callback function. Callback attribute is optional, sometimes you just want to ping the server and you don't care about the response.
function ajax (url, callback) {
callback = callback || function () {};
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
callback(xhr.responseText);
}
};
xhr.open("GET", url, true);
xhr.send();
@mhlavac
mhlavac / devel2013.md
Created March 3, 2013 10:12
My notes from devel 2013 conference

EsteJS - javascriptové aplikace robusně, modulárně a komfortně Daniel Steigerwald

  • Grunt - The JavaScript Task Runner
  • Bower - A package manager for the web
  • Component - Component package manager for building a better web.
  • AngularJS - MVC Javascript framework
  • Sencha, Dojo...

Kinohled.cz za 2 týdny Vojtěch Semecký

@holms
holms / gist:5005629
Last active September 16, 2024 22:52
midnight commander dark color theme
Edit mc’s ini file (either ~/.mc/ini or ~/.config/mc/ini) and look for the line [Colors]. Then, change the line base_color to this:
[Colors]
base_color=linux:normal=white,black:marked=yellow,black:input=,green:menu=black:menusel=white:menuhot=red,:menuhotsel=black,red:dfocus=white,black:dhotnormal=white,black:dhotfocus=white,black:executable=,black:directory=white,black:link=white,black:device=white,black:special=white,black:core=,black:stalelink=red,black:editnormal=white,black
@dwtkns
dwtkns / README.md
Last active March 28, 2023 23:31
Faux-3D Arcs

Building on this - experimenting with fake 3d svg arcs using two nested orthographic projections and cardinal line interpolation.

@uupaa
uupaa / HTML5FunctionsSQLiteDBPath.txt
Created January 31, 2013 10:48
HTML5 Functions SQLite.db path. WebStorage(LocalStorage), WebSQL, Application Cache, IndexedDB
MobileSafari:
Application Cache:
?
WebSQL:
/var/mobile/Library/WebKit/Databases/
WebStorage:
/var/mobile/Library/WebKit/LocalStorage/
IndexedDB:
?
@mbostock
mbostock / .block
Last active May 8, 2023 14:30 — forked from mbostock/.block
Treemap
border: no
height: 600
license: gpl-3.0
redirect: https://beta.observablehq.com/@mbostock/d3-treemap
@mbostock
mbostock / .block
Last active September 6, 2023 14:50
Sunburst Partition
license: gpl-3.0
redirect: https://beta.observablehq.com/@mbostock/d3-sunburst
@mbostock
mbostock / .block
Last active August 21, 2024 02:24
Calendar View
license: gpl-3.0
height: 2910
border: no
redirect: https://observablehq.com/@d3/d3-calendar-view
@mbostock
mbostock / .block
Last active December 11, 2024 17:30 — forked from mbostock/.block
Bar Chart
license: gpl-3.0
redirect: https://beta.observablehq.com/@mbostock/d3-bar-chart