component
├── src
│ ├── scripts
│ │ ├── module.js
│ │ ├── services
│ │ │ └── cache.js
│ │ ├── directives
│ │ │ └── login.js
│ │ └── filters
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/bash | |
download_status() { | |
if [ -f $1 ]; then | |
while : ; do | |
sleep 1 | |
local speed=$(echo `cat $1 | grep -oh '\([0-9.]\+[%].*[0-9.][s|m|h|d]\)' | tail -1`) | |
echo -n "Downloading... $speed" | |
echo -n R | tr 'R' '\r' |
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 node | |
/** | |
* A very basic Node.js Bower installer replacement for download private hosted components | |
* @version 0.1 | |
* @license WTFPL | |
* | |
* Usage: | |
* node bower-private-install.js -u username -p password -f ../bower.json | |
* | |
* TODO: |
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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
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
@mixin make-grid-columns($cols: $cols-all) { | |
// Common styles for all sizes of grid columns, widths 1-12 | |
@debug #{$cols}; | |
#{$cols} { | |
position: relative; | |
// Prevent columns from collapsing when empty | |
min-height: 1px; | |
// Inner gutter via padding | |
padding-left: ($grid-gutter-width / 2); | |
padding-right: ($grid-gutter-width / 2); |
Croak example project structure and configuration scenario
$HOME
├── .croakrc
└── workspace
├── builder
│ ├── tasks
│ ├── node_modules
│ ├── .jshintrc
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
LIB = $(SRC:src/%.js=lib/%.js) | |
build: $(LIB) | |
define release | |
VERSION=`node -pe "require('./package.json').version"` && \ | |
NEXT_VERSION=`node -pe "require('semver').inc(\"$$VERSION\", '$(1)')"` && \ | |
node -e "\ | |
var j = require('./package.json');\ | |
j.version = \"$$NEXT_VERSION\";\ |
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
// origin source: https://github.com/indieisaconcept/grunt-styleguide/blob/master/tasks/styleguide.js#L221 | |
styleguide.files = { | |
file: file, | |
src: files.length > 0 && files || grunt.file.exists(file.orig.src) && file.orig.src, | |
dest: file.dest | |
}; | |
styleguide.files.base = (function () { | |
var base; |
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
+----------------+----------+------------+-----------+---------+--------+----------+---------+-------+ | |
| Can we inject? | Constant | Controller | Directive | Factory | Filter | Provider | Service | Value | | |
+----------------+----------+------------+-----------+---------+--------+----------+---------+-------+ | |
| Constant | | | | | | | | | | |
| Controller | | | | | | | | | | |
| Directive | | | | | | | | | | |
| Factory | | | | | | | | | | |
| Filter | | | | | | | | | | |
| Provider | | | | | | | | | | |
| Service | | | | | | | | |
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
function loadScript(src) { | |
var head = document.getElementsByTagName('head')[0]; | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = src; | |
head.appendChild(script); | |
} | |
loadScript('fucking/ie8/script.js'); |