This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Example of using parametrised multiple bounds in Java 7. | |
This is just showing how stuff is connected - it really does not make any sense in itself. | |
Compiles with JDK7. | |
*/ | |
import java.util.ArrayList; | |
import java.util.List; | |
// parametrised interfaces | |
interface IF1<T>{T returnIt();} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[31m 4 failing[0m | |
[0m 1) Kit should parse imports: | |
[0m[31m Error: Line 1 in imports.kit: You're attempting to import a file that does not exist in the specified location: someFile.kit" -->[0m[90m | |
at Kit._findFile (C:\tmp\node-kit\lib\node-kit.js:365:11) | |
at Kit._handleImport (C:\tmp\node-kit\lib\node-kit.js:316:21) | |
at Kit._compileToken (C:\tmp\node-kit\lib\node-kit.js:285:35) | |
at Kit.compile (C:\tmp\node-kit\lib\node-kit.js:110:14) | |
at Kit.toString (C:\tmp\node-kit\lib\node-kit.js:122:28) | |
at kit (C:\tmp\node-kit\lib\node-kit.js:21:25) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Grunt file that shows how dynamic config (and option!) values | |
// are not used in the grunt-contrib-concat task. Run using 'grunt' | |
module.exports = function(grunt){ | |
grunt.initConfig({ | |
concat : { | |
foo : { | |
src: '<%= grunt.config.get("myfiles") %>', | |
dest : 'outfile.txt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
check() { | |
cd develop && npm install && grunt sanity-checks | |
} | |
if [[ $(git symbolic-ref --short HEAD) == 'internal' ]]; then | |
echo On internal branch - testing commit | |
check | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
########################################################################## | |
# Copyright 2009 Broadcom Corporation | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* HACKED VERSION of 1.4.9 - has native console.log formatting of objects | |
* | |
* | |
* Copyright 2014 Tim Down. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# space_remover.py | |
# | |
# Script to remove spaces at the end of folder or file names | |
# This is a problem when creating a folder on a platform other | |
# than Windows and sharing that folder with a Windows user | |
# The Windows user will then not be able to work with files | |
# within that folder. | |
# The solution is simply to remove the space at the end of | |
# the folder name, but this is not possible to do through | |
# the Windows GUI interface. Normal "CMD" also has problems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Minimal singleton router - good enoughfor our needs | |
* 654 bytes using Google Closure Compiler and gzipping | |
* | |
* @see http://krasimirtsonev.com/blog/article/A-modern-JavaScript-router-in-100-lines-history-api-pushState-hash-url | |
* | |
* @example | |
* // configuration | |
* Router.config({ mode: 'history'}); | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Helper functions to validate Rescue Time stats | |
// Copy paste into the console or add to Code Snippets in Chrome => run | |
// run in the console by running `printStats()` | |
function findElems() { | |
return $('.report-table tr td:nth-child(2)'); | |
} | |
function t(time) { | |
var tmp, min, sek; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* How to create a Promise I can control | |
* when and if it resolves | |
* @returns {promise, resolve, reject} | |
*/ | |
function promiseStub(){ | |
var result = {}; | |
result.p = new Promise(function(res,rej){ | |
result.resolve = res; | |
result.reject = rej; |
OlderNewer