-
Create a file in /etc/profile.d/ directory
- myAlias.sh
-
Define the alias in the file
alias gotoserver1="ssh user@192.168.1.100"
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Angular HTML5 Preview, Crop And Upload</title> | |
<style> | |
body { | |
padding: 50px; | |
font: 16px Helvetica; | |
} |
Sometimes we need to hold some values from model in data-
attributes of tag. But we can't use $data
special variable in cell's htmlOptions
attributes. Instead of holding data in cell, we can generate data-
attributes for rows (tr
). For this purpose CGridView
has special attribute rowHtmlOptionsExpression
.
<?php
$this->widget( 'zii.widgets.grid.CGridView',
[
'id' => 'my-grid',
'dataProvider' => $model->search(),
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
<? | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( | |
CURLOPT_RETURNTRANSFER => 1, | |
CURLOPT_URL => 'http://www.google-analytics.com/collect?v=1&tid=[UA-XXXXXXXXX-1]&cid=[RANDOM_INTEGER_OR_GUID]&t=event&ec=[EVENT_CATEGORY]&ea=[EVENT_ACTION]&el=[EVENT_LABEL]', | |
CURLOPT_USERAGENT => 'Vanity-URL-Tracker', | |
)); | |
$resp = curl_exec($curl); | |
curl_close($curl); | |
header("HTTP/1.1 301 Moved Permanently"); |