Skip to content

Instantly share code, notes, and snippets.

Avatar

Jan Killian iki

View GitHub Profile
View .gitconfig
# 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
#
@iki
iki / app.js
Created Sep 17, 2014
snippets for dynamic color scheme
View app.js
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) {
@iki
iki / ubuntu-14.04-desktop-amd64.sh
Last active Aug 29, 2015
shell script to download [kxl]ubuntu release iso ... just rename the script to requested edition-release-type-platform
View ubuntu-14.04-desktop-amd64.sh
#!/bin/sh
name="${0##*/}"
name="${name%.sh}"
edition="${name%%-*}"
version="${name#*-}"
version="${version%%-*}"
# use main ubuntu cdimage server
if [ "$edition" = 'ubuntu' ]; then
@iki
iki / vm-cleanup
Last active Aug 29, 2015
Cleanup VM for exporting to appliance
View vm-cleanup
#!/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 / logging.js
Last active Aug 29, 2015
Enable logs from your unit tests using logging.on|off() methods
View logging.js
/*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 / README.md
Last active Dec 29, 2015
Getting started in a m.e.a.n. way (MongoDB, Express, AngularJS, Node.js)
View README.md
View ngseed.md

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 Dec 14, 2015
Building Angular.js on Windows
View README.md

Building Angular.js on Windows

Current grunt based build

  1. Install grunt launcher.

     npm install -g grunt-cli
    
  2. Run grunt as Administrator. That's needed to create directory symlinks using mklink /d.