This file contains hidden or 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
| #ckup folder within the server where backup files are stored | |
| BAK_DEST=/your/backup/destination | |
| #folders for backup, can be comma separated for multiple folders | |
| BAK_SOURCES=/your/source/destination | |
| #number of days to keep archives | |
| KEEP_DAYS=3 | |
| #script variables |
This file contains hidden or 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
| #!/bin/bash | |
| # Note, we are using "echo 3", but it is not recommended in production instead use "echo 1" | |
| #make sure to set permsision of this file to 755 | |
| echo "echo 3 > /proc/sys/vm/drop_caches" |
This file contains hidden or 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
| func setTextField(textfield: UITextField){ | |
| let width = CGFloat(2.0) | |
| let border = CALayer() | |
| border.borderColor = UIColor.white.cgColor | |
| border.frame = CGRect(x: 0, y: textfield.frame.size.height - width, width: textfield.frame.size.width, height: textfield.frame.size.height) | |
| textfield.layer.addSublayer(border) | |
| textfield.layer.masksToBounds = true | |
| border.borderWidth = width | |
| } |
This file contains hidden or 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
| #!/bin/bash | |
| PROJECT_PATH="YOUR_GIT_FOLDER_PATH" | |
| DESTINATION_PATH="DESTINATION_PATH" | |
| cd $PROJECT_PATH | |
| LAST_COMMIT="$(git rev-parse --short HEAD)" | |
| echo "last commit found ${LAST_COMMIT}" | |
| #pull new changes | |
| git pull | |
| CHANGED_FILES="$(git diff --name-only --diff-filter=ACMR ${LAST_COMMIT} HEAD)" |
This file contains hidden or 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
| <?php | |
| function gen_team($designation) | |
| { | |
| $root = $designation; | |
| $user = getuser($root); | |
| foreach($user as $u) | |
| { | |
| $diff=0; | |
| $target=getclubtarget($root); | |
| $target_left[$u] = $target; |
This file contains hidden or 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
| #!/bin/bash | |
| INPUT=$1 | |
| OUTPUT=$2 | |
| OLDIFS=$IFS | |
| IFS="," | |
| [ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; } | |
| [ -f $OUTPUT ] && { rm $OUTPUT; } | |
| [ ! -f $OUTPUT ] && { touch $OUTPUT; } | |
| while read mac ip subnet uname comment |
This file contains hidden or 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
| <IfModule mod_rewrite.c> | |
| ############################################ | |
| ## enable rewrites | |
| Options +FollowSymLinks | |
| RewriteEngine on | |
| ############################################ | |
| ## you can put here your magento root folder |
This file contains hidden or 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
| #!/bin/bash | |
| #---------------------------------------- | |
| # OPTIONS | |
| #---------------------------------------- | |
| USER='username' # MySQL User | |
| PASSWORD='password' # MySQL Password | |
| DAYS_TO_KEEP=2 # 0 to keep forever | |
| GZIP=1 # 1 = Compress | |
| BACKUP_PATH='/your/backup/destination' | |
| #---------------------------------------- |
This file contains hidden or 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
| <?php | |
| /** | |
| * Main payment controller | |
| * | |
| * @category Controller | |
| * @package Junaidbhura_Fssnet | |
| * @author Junaid Bhura <info@junaidbhura.com> | |
| */ | |
| class Junaidbhura_Fssnet_PaymentController extends Mage_Core_Controller_Front_Action { |
This file contains hidden or 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
| function transpose($array) { | |
| $transposed_array = array(); | |
| if ($array) { | |
| foreach ($array as $row_key => $row) { | |
| if (is_array($row) && !empty($row)) { //check to see if there is a second dimension | |
| foreach ($row as $column_key => $element) { | |
| $transposed_array[$column_key][$row_key] = $element; | |
| } | |
| } | |
| else { |