Skip to content

Instantly share code, notes, and snippets.

Verifying my Blockstack ID is secured with the address 1N4JtW2rHFdMR3QeuCSUvif4aWcHCRt5DR https://explorer.blockstack.org/address/1N4JtW2rHFdMR3QeuCSUvif4aWcHCRt5DR
@stream7
stream7 / mxSwimlaneLayout.js
Created November 7, 2017 16:48 — forked from davidjgraph/mxSwimlaneLayout.js
23.09.2013 Swimlane layout fix
/**
* $Id: mxSwimlaneLayout.js,v 1.3 2013/09/23 14:11:22 david Exp $
* Copyright (c) 2005-2012, JGraph Ltd
*/
/**
* Class: mxSwimlaneLayout
*
* A hierarchical layout algorithm.
*
* Constructor: mxSwimlaneLayout
@stream7
stream7 / gist:550622206741ca5362599bbcd16eaeb8
Created September 11, 2016 11:21
how to download a website with wget
# download html
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--no-parent \
--restrict-file-names=nocontrol \
@stream7
stream7 / gist:4e0037fa497664987455cdb48aff9de9
Created April 3, 2016 08:07
wget commands for downloading a whole website
// Get the pages
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--no-parent \
--restrict-file-names=nocontrol \
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
#
# Update 2013-06-24: added -w0 option to prevent truncated lines
require 'base64'
data=`ioreg -l -w0 -d0 -r -c AppleDisplay`
@stream7
stream7 / toUpperCase Greek
Last active December 22, 2015 20:09
toUpperCase for Greek chars
/*global define*/
'use strict';
define(function () {
var map = {
'ά': 'A',
'Ά': 'Α',
'έ': 'Ε',
'Έ': 'Ε',
'ή': 'Η',
'Ή': 'Η',
@stream7
stream7 / dabblet.css
Created July 12, 2013 20:39 — forked from LeaVerou/dabblet.css
Flexible buttons with ems (duh!)
/**
* Flexible buttons with ems (duh!)
*/
body {
font-family: sans-serif
}
button {
padding: .5em .8em .4em;
@stream7
stream7 / gist:5671932
Created May 29, 2013 17:05
bitbucket exception
$ git push --force
Counting objects: 375, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (274/274), done.
Writing objects: 100% (277/277), 47.32 KiB, done.
Total 277 (delta 199), reused 0 (delta 0)
remote: Traceback (most recent call last):
remote: File "/opt/python/domains/bitbucket.org/current/bitbucket/scripts/git/hooks/pre-receive", line 29, in <module>
remote: from bitbucket.apps.repo2.hooks import prehooks
remote: File "/opt/python/domains/bitbucket.org/current/bitbucket/apps/repo2/hooks.py", line 16, in <module>
@stream7
stream7 / main.js
Created April 10, 2013 15:48
main.js
require.config({
paths: {
jquery: '../components/jquery/jquery',
backbone: '../components/backbone/backbone',
underscore: '../components/underscore/underscore',
handlebars: '../components/handlebars/handlebars',
cookie: 'vendor/jquery.cookie',
routefilter: 'vendor/backbone.routefilter',
text: '../components/requirejs-text/text'
},
@stream7
stream7 / gist:5300987
Created April 3, 2013 12:57
npm install -g generator-backbone-amd
15:55 ~ $ npm install -g generator-backbone-amd
npm http GET https://registry.npmjs.org/generator-backbone-amd
npm http 304 https://registry.npmjs.org/generator-backbone-amd
npm http GET https://registry.npmjs.org/generator-backbone-amd/-/generator-backbone-amd-0.0.2.tgz
npm http 200 https://registry.npmjs.org/generator-backbone-amd/-/generator-backbone-amd-0.0.2.tgz
npm ERR! tar pack Error reading /var/folders/qy/kkl925690s50nmkmc6xls8040000gn/T/npm-5823/1364993719396-0.3919644276611507/package
npm ERR! TypeError: Cannot call method 'filter' of undefined
npm ERR! at Packer.IgnoreReader.addIgnoreRules (/Users/niko/.nvm/v0.8.22/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js:148:13)
npm ERR! at Packer.IgnoreReader.addIgnoreFile (/Users/niko/.nvm/v0.8.22/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js:133:10)
npm ERR! at fs.readFile (fs.js:176:14)