Linux Tricks

In this article i would like to share some linux command tricks, which may help you through the admin day.

count the connection per port:
netstat -plan|grep :80|awk {‚print $5‘}|cut -d: -f 1|sort|uniq -c|sort -nk 1 | wc -l
delete files older than 5 days:
find /path_to_check/temp* -type d -ctime +5 -exec rm -Rf {} \;
show zombie processes:
ps aux | awk ‚{ print $8 “ “ $2 }‘ | grep -w Z
kill zombies:
ps -ef | grep defunct | awk ‚{ print $3 }‘ | xargs kill -9

Git Tricks

Recover orgnal files from repository:
reset to HEAD
git reset –hard HEAD
git pull

GitVideo (gource required)
gource –bloom-multiplier 1.2 –bloom-intensity 1.2 –seconds-per-day 10 –title „mediAsystent“ –auto-skip-seconds 1 -1280×720

Yii Tricks

Name des Kontrollers:
Yii::app()->controller->id

oder

Yii::app()->getController()->getId()
Neuer Eintrag oder ändern in der Datenbank:
if (($model = ModelObject::model()->findByPk($obj_id))===null){
                    $model=new ModelObject;
                    $model->OBJ_ID = $obj_id;
                    $model->GROUP_ID = NULL;
                    .
                    .
                    .
                }
                else{
                    $model->OBJ_ID = $obj_id;
                    $model->GROUP_ID = NULL;
                    .
                    .
                    .
                }
                $model->save(); // save or update group record
Lesen GET/POST data

Yii::app()->request->getQuery($key, $defaultValue); // POST
Yii::app()->request->getPost($key, $defaultValue); // GET

 

Skills

Experience with web development languages of PHP, HTML, CSS and JavaScript/jQuery.

HTML

  • Familiarity of HTML syntax for multiple specifications, including HTML 5.
  • Knowledge of the semantic meaning of all HTML elements.
  • Knowledge of markup used for layout such as dividers.
  • Knowledge at the level to be able to hand-code markup.
  • Including media and images.

PHP

  • Frameworks like Yii, Zend
  • Understanding how to utilize PHP to filter, process and output html, json, xml

CSS

  • Specifying different CSS for various media, devices and displays.
  • Best practices in CSS file organization and structure.
  • Methods for including CSS inline, internal and external via linked style sheets.
  • How to define, combine and group CSS selectors for HTML elements, ID, classes, pseudo classes, child or sibling.
  • Syntax of CSS declarations, properties and attributes.
  • CSS box model and methods for CSS positioning, absolute and relative.
  • Knowledge of properties and attributes to control the display.
  • Familiarity with differences in CSS 2 and CSS 3.
  • Proficient with a CSS Preprocessor such as Sass or LESS.

Best practices

  • Methods to ensure browser & device compatibility
  • Methods for degrading gracefully for older browsers and displays.
  • Methods to ensure accessibility.
  • File compression techniques for improving speed.

JavaScript

  • Knowledge of the operators, variables, datatypes, objects, properties and methods.
  • Familiarity with control structures such as objects, functions, conditional statements, arrays, loops and expressions.
  • Forms and regular expression validation and submitting data.
  • Knowledge of how to apply logical operators and conditional statements.
  • Knowledge of the DOM HTML objects and their properties.

jQuery

  • Knowledge of how to employ the jQuery library for visual effects, event handling, and document manipulation.

Home

BROAD EXPERTISE TO TAKE YOUR BUSINESS TO THE NEXT LEVEL

Our website and mobile apps development professionals recognize the value of solid information architecture design and integrative branding that engages the customer from the first stop at your site. Engagement with your customer is crucial to tying into their emotional connection to your site and developing loyalty.

We offer:
  • personalized webpages/portals

  • content management systems

  • database driven applications

  • low priced wordpress solutions

  • mobile apps (iOS/Android)

We speak english, german and polish.

contact us: info at wysiecki.de