Skip to main content

Posts

LESS summary

LESS summary http://lesscss.org/ Feature Example Variable @nice-blue: #5B83AD ; @light-blue: @nice-blue + #111 ; #header { color : @light-blue ; } Nesting #header { color : black; } #header .navigation { font-size : 12px ; } #header .logo { width : 300px ; } Into LESS: #header { color : black; .navigation { font-size : 12px ; } .logo { width : 300px ; } } Parametric Mixins .border-radius ( @radius ) { -webkit-border-radius : @radius ; -moz-border-radius : @radius ; border-radius : @radius ; } or with default value: .border-radius ( @radius : 5px ) { -webkit-border-radius : @radius ; -moz-border-radius : @radius ; border-radius : @radius ; } #header { .border-radius ( 4px ); } .button { .border-radius ( 6px ); } Operations @base: 5% ; @filler: @base * 2 ; @other: @base + @filler ; Namespaces and Accessors Define: #bundle { .button { display : block; border : 1px ...

AngularJS: dummy guide for service, factory, provider, configuration

Resources: Angular.js: service vs provider vs factory? AngularJS Factory, Service and Provider Understanding Service Types Angular Constants, Values, Factories, Services, Providers and Decorators, Oh My! Providers (docs) $provide (docs) Summary of below explanation After writing below explanation I found out that I just need very short summary for each time I write service or factory. General Idea Service / Factory / Provider are ways to define singletons in angularJS application. they are injected when asked for. When they are defined, they are given (1) name and (2) function. Service and Factory are suger function that convert their input to providers. Usage: Value injected for service - instance of the service function. Value injected for factory - return value of factory function. Value injected for provider -  In config phase - instance of provider function. In run phase - return value of $get() of provider function. Overview ...

grunt error

In case you get below error: c:\>grunt module.js:340     throw err;           ^ Error: Cannot find module 'glob'     at Function.Module._resolveFilename (module.js:338:15)     at Function.Module._load (module.js:280:25)     at Module.require (module.js:364:17)     at require (module.js:380:17)     at Object. (C:\Users\birer\AppData\Roaming\npm\node_modules\grunt-cli\node_modules\findup-sync\lib\findup-sync.js:15:12)     at Module._compile (module.js:456:26)     at Object.Module._extensions..js (module.js:474:10)     at Module.load (module.js:356:32)     at Function.Module._load (module.js:312:12)     at Module.require (module.js:364:17) Try below lines to fix it: npm uninstall -g grunt-cli npm install -g grunt-cli

CAC

CAC = Common Access Card מתוך הערך שהוספתי לויקיפדיה: CAC  הינו שם קוד לרגולציה של הממשל האמריקני. קיימות מספר משמעויות פרקטיות לרגולציה זו אך המשמעות השכיחה הינה הדרישה כי ביצוע הזדהות (authentication) למערכת \ ליישום \ למחשב תתבצע ע"י כרטיס חכם פיזי ולא על ידי שם משתמש וסיסמא. כ כל הנראה, כבר עד סוף השנה, כל יישום אשר נמצא בשימוש של חברה פדרלית, צריך לאפשר מצב עבודה בו כניסה למערכת תתבצע אך ורק ע"י כרטיס CAC. הממשל מעודד חברות תוכנה אשר מאפשרות מצב עבודה זה לקבל הסמכה בסיסית המאשרת כי התוכנה תומכת באופן בסיסי ב CAC. ההסמכה הזו ניתנת ע"י חברה פדרלית בשם JITC. קצת מידע טכני: על כרטיס CAC ישנם מספר certificates בפורמט X.509. רק חלק מתעודות אלה מורשות להיות בשימוש לזיהוי ה end user. הם יכולות להיות client certificates בעת הקמת ערוץ ה SSL מתחנת הקצה לשרת (או לפרוקסי שנמצא לפניו). זיהוי המשתמש עצמו נמצא בשדה subject ב client certificate. בדר"כ יהיה רשום זיהוי המשתמש ב attribute בשם CN או EMAIL.

Linux useful commands for Apache

When Apache run on linux, there are several usefull commands: Assumption: Apache is installed on /sw/pkg/apache. See server status /sw/pkg/apache/bin/apachectl Validate configuration files /sw/pkg/apache/bin/httpd -t Stop apache /sw/pkg/apache/bin/apachectl -k stop See server version /sw/pkg/apache/bin/httpd -v See who listen on port 80 netstat  | grep 80 netstat -ltnp | grep ':80'