Skip to content

Instantly share code, notes, and snippets.

Avatar

Thanos Polychronakis thanpolas

View GitHub Profile
View response-of-oauth.html
<!-- The result of the popup window -->
<script>opener.ss.user.tw.oauthToken('token-312123123');close();</script>
View dabblet.css
body {
background: blue;
padding:0;
}
header {
height: 200px;
background-color: red;
margin: 0;
display:block;
View when-externs.js
/**
* @externs
* @license MIT License (c) copyright 2011-2013 original author or authors
*/
/**
* [when description]
* @param {[type]} promiseOrValue [description]
* @param {Function=} optOnFulfilled [description]
* @param {Function=} optOnRejected [description]
View bootstrap.less
@import "variables.less";
@import "generated.less";
@import "styles.less";
@thanpolas
thanpolas / phantom.html
Created Feb 22, 2013
phantomJS failing on array sort
View phantom.html
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@thanpolas
thanpolas / LayoutManager beforeRender() and render() callbacks
Last active Dec 12, 2015
LayoutManager `beforeRender()` and `render()` callback scaffoldings.
View LayoutManager beforeRender() and render() callbacks
/**
* The beforeRender callback scaffolding.
*
* @param {Backbone.Layout} view The instance of the LayoutManager.
* @return {void} Don't care.
*/
beforeRender: function( view ) {
console.log(view.template); // show the template of the view instance
// optionally beforeRender can be async
@thanpolas
thanpolas / gist:4727303
Last active Dec 12, 2015
Grunt Task for node
View gist:4727303
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-watch');
// Project configuration.
grunt.initConfig({
@thanpolas
thanpolas / gist:4706309
Created Feb 4, 2013
nodejs handlebars + layoutmanager + backbone
View gist:4706309
requirejs = require('requirejs'),
LayoutManager = require("backbone.layoutmanager"),
hbsCompiled;
requirejs(['handlebars-helpers'], function(){
hbsCompiled = require('../static/js/templates/hbsCompiled');
var hand = require('Handlebars');
});
LayoutManager.configure({
@thanpolas
thanpolas / gist:4595043
Last active Dec 11, 2015
node.js :: Checks if the define process is running
View gist:4595043
/**
* Checks if the define process is running
* @param {string} process The process.
* @param {function(boolean)} The result of the operation.
* @return {void}
*/
function isRunning(process, cb) {
var checkCommand = 'ps x|grep ' + process + '|grep -v grep|awk \'{print $1}\'';
var execOptions = {};
View dabblet.css
body {
background: blue;
padding:0;
}
header {
height: 200px;
background-color: red;
margin: 0;
display:block;
overflow: hidden;