Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Sebastian Golasch asciidisco

🏠
Working from home
View GitHub Profile
View chat.js
// Module dependencies.
var express = require('express')
, stylus = require('stylus')
, nib = require('nib')
, sio = require('socket.io')
, app = null;
// Create application server
app = express.createServer();
View cssminex
cssmin: {
build: {
src: ['src/css/boilerplate_top.css', 'src/css/ui/jquery.ui.base.css', 'src/css/ui/jquery.ui.theme.css', , 'src/css/ui/jquery.ui.slider.css', 'src/css/ui/jquery.ui.core.css', 'src/css/jquery.jscrollpane.css', 'src/css/screen.css', 'src/css/slider.css', 'src/css/boilerplate_bottom.css'],
dest: 'build/css/main.css'
}
},
min : {
build: {
src: ['src/js/jquery.js', 'src/js/plugins.js'],
dest: 'build/js/all.js'
@asciidisco
asciidisco / iot.md
Created Jul 4, 2012
Image optimization tools (losless)
View iot.md

I want your lossless image optimization tool knowlegde:

Note: I´am looking for cmd tools (preferred running on mac/linux/win - but it´s not a must) Online services are welcome as well. If you have a good article, stackoverflow post or smth. else on image optimization (with statistics & stuff), i would appriciate if you could share that, too.

Already suggested:

@asciidisco
asciidisco / ga.txt
Created Sep 10, 2012
Grunt absract
View ga.txt
Nowadays frontend developers have to deal with topics & tools that they´ve never encountered before: unit testing, code linting, minification, code modularization, etc. ...
Those who done it know, setting everything up and maintaining it is a pain that costs
hours of working time.
But that´s not true anymore; thanks to Grunt, we now have a frontend specific build tool that eliminates most of hard work.
During this talk we will learn how to setup grunt, learn to use it in a real world project and discover it´s ecosystem with plenty of written plugins.
@asciidisco
asciidisco / pijs.js
Created Sep 10, 2012
"Privates" in JS
View pijs.js
// Defining "private" properties in JavaScript
// define youre own scope by using an
// immediate executed function
(function (){
// x is only be visible within this scope a.k.a this function
var x = null;
var Bla = function(blup) {
@asciidisco
asciidisco / pubsub_with_requirejs_backbone.js
Created Oct 31, 2012
PubSub with requirejs & backbone
View pubsub_with_requirejs_backbone.js
// PubSub impl. with require.js & backbone.js
// events.js
define(['underscore', 'backbone'], function (_, Backbone) {
'use strict';
var events = {};
_.extend(events, Backbone.Events);
return events;
});
@asciidisco
asciidisco / getTitle.js
Created Jan 31, 2013
Access PhantomJS via WebDriver/JSONWireProtocol from node to receive the title of a webpage
View getTitle.js
// before you launch this script, make sure you have phantomjs v1.8 installed
// and launch it with the port specified in the options: ´$ phantomjs --webdriver=3456´
var http = require('http');
// request body for "/wd/hub/session" request
var body = JSON.stringify({desiredCapabilities: {browserName: 'firefox', version: '', platform: 'ANY'}});
// base options for post requests
var options = {
View en-US.resjson
// de-de
{
// Appbar commands
, "MyLocation" : "Mein Standort"
, "MyLocationTooltip" : "Finde deinen aktuellen Standort"
, "GetAllCars" : "Zeige alle Autos"
, "GetAllCarsTooltip" : "Finde alle verfügbaren car2go Fahrzeuge"
, "ShowParking" : "Zeige mir einen Parkplatz"
, "ShowParkingTooltip" : "Zeige mir alle car2go Parkplätze"
@asciidisco
asciidisco / dalek_iframe_login_TEST.js
Last active Dec 17, 2015
Test login in embedded iframe that is also protected by http auth
View dalek_iframe_login_TEST.js
module.exports = {
// name of the suite
name: 'some super secret project login test',
// Can log in @portal, go to dashbaord, and can go further from there
'can log in @portal': function (test) {
'use strict';
test.expect(3)
.setHttpAuth('username', 'password')
@asciidisco
asciidisco / dalek_vimeo_login_TEST.js
Last active Dec 17, 2015
DalekJS login test (vimeo testcase)
View dalek_vimeo_login_TEST.js
module.exports = {
'can log in at vimeo': function (test) {
'use strict';
test.expect(1)
.open('http://vimeo.com/log_in')
.type('#email', 'foo@bar.com')
.type('#password', 'baz')
.click('.submit .btn')
.assert.text('#page_header h1 a', 'foobar')