Skip to content

Instantly share code, notes, and snippets.

Avatar

Oliver Georgi slackero

  • webverbund.de + ООО Систрон
  • Moscow + Dessau
  • Twitter @slackero
View GitHub Profile
@Haraguroicha
Haraguroicha / showModalDialog.js
Created Mar 23, 2016
alternative function of showModalDialog for Chrome
View showModalDialog.js
///========================================
/// showModalDialog.js
///
/// Created by Haraguroicha 2014-10-06
///========================================
(function() {
window._smdName = window._smdName || Math.round(Math.random() * 1000000000);
window.spawn = window.spawn || function(gen) {
function continuer(verb, arg) {
var result;
@addyosmani
addyosmani / package.json
Last active Nov 25, 2021
npm run-scripts boilerplate
View package.json
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@consti
consti / hosts
Last active Jan 15, 2022
/etc/hosts to block shock sites etc.
View hosts
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@irae
irae / _Stay_standalone.md
Last active Oct 22, 2021 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari
View _Stay_standalone.md

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.

@remy
remy / trim-canvas.js
Last active Jan 11, 2022
Trims the surrounding transparent pixels from a canvas
View trim-canvas.js
// MIT http://rem.mit-license.org
function trim(c) {
var ctx = c.getContext('2d'),
copy = document.createElement('canvas').getContext('2d'),
pixels = ctx.getImageData(0, 0, c.width, c.height),
l = pixels.data.length,
i,
bound = {
top: null,