Skip to content

Instantly share code, notes, and snippets.

View iki's full-sized avatar

Jan Killian iki

View GitHub Profile
@iki
iki / body
Created April 8, 2013 10:33
subject
hello
@iki
iki / ngseed.md
Created August 27, 2013 11:58 — forked from leostera/ngseed.post

CleverStack

Angular Seed

YAAS (Yet Another Angular Seed)

While know about the existence of ng-boilerplate, the angular-app repo on Github, or even Yeoman and it's angular-generator, none of those really fit the bill when it comes to structuring a medium to large application as it often is the case here at Clevertech.

This is not yet another angular seed: this is the collaborative effort of open source enthusiasts to solve the most of the problems in AngularJS development. Yes, we took the liberty of adding a bit of a bleak packaging but that allows us for dead-easy installing, upgrading and extending.

Let's dive into it.

@iki
iki / README.md
Last active December 29, 2015 00:09
Getting started in a m.e.a.n. way (MongoDB, Express, AngularJS, Node.js)
@iki
iki / logging.js
Last active August 29, 2015 13:57
Enable logs from your unit tests using logging.on|off() methods
/*Enable logs from your unit tests using logging.on|off() methods.
Provides stringifier to stripped JSON for safe logging of objects
with cyclical references, DOM elements, angular scopes, or window.
By default, logging.on/off() works with window.console,
or with $log service if angular is detected.
By default, logging class attaches to jasmine.logging,
or mocha.logging, or window.logging.
@iki
iki / vm-cleanup
Last active August 29, 2015 13:58
Cleanup VM for exporting to appliance
#!/bin/bash
#|Usage: <command> [OPTIONS]
#|
#|Clean development VM for exporting to appliance:
#|
#| - update system: apt-get update and upgrade
#| - install zerofree package
#| - remove user ssh keys
#| - stop foreman and django
#| - stop mongodb, compact database, purge journal
@iki
iki / ubuntu-14.04-desktop-amd64.sh
Last active August 29, 2015 13:59
shell script to download [kxl]ubuntu release iso ... just rename the script to requested edition-release-type-platform
#!/bin/sh
name="${0##*/}"
name="${name%.sh}"
edition="${name%%-*}"
version="${name#*-}"
version="${version%%-*}"
# use main ubuntu cdimage server
if [ "$edition" = 'ubuntu' ]; then
@iki
iki / app.js
Created September 17, 2014 14:37
snippets for dynamic color scheme
if (settings.mainColor) {
_.each(document.styleSheets, function(styleSheet) {
if (styleSheet.title === 'mainColor') {
_.each(styleSheet.cssRules || styleSheet.rules, function(rule) {
if (rule.type === 1 && rule.cssText && rule.style) {
if (rule.cssText.indexOf('BgColor') !== -1) {
console.log('style: background color ' + settings.mainColor + ' @ ' + rule.cssText, {rule: rule});
rule.style.backgroundColor = settings.mainColor;
}
if (rule.cssText.indexOf('FontColor') !== -1) {
# Edit this file as you like and merge with $HOME/.gitconfig (global) or .git/config (given repo only)
#
# See https://help.github.com/articles/set-up-git
#
# See http://git-scm.com/docs/git-config
# or http://www.kernel.org/pub/software/scm/git/docs/git-config.html
#
# See http://git-scm.com/book/en/Customizing-Git-Git-Configuration
# or http://progit.org/book/ch7-1.html
#
fs = require 'fs'
log = console.log
dump = (obj) -> JSON.stringify obj, null, 2
keys = Object.keys
src = process.argv[2] or 'package.json'
log src
pkg = JSON.parse fs.readFileSync src
log 'JSON: ' + dump pkg