Creating a new PHPExcel Object.
$this->PHPExcel = new PHPExcel();
Creating a new sheet:
<?php | |
$phpExcel = new PHPExcel(); | |
$phpExcel->getActiveSheet()->setTitle("My Sheet"); | |
$phpExcel->setActiveSheetIndex(0); | |
header("Content-Type: application/vnd.ms-excel"); | |
header("Content-Disposition: attachment; filename=\"filename.xls\""); | |
header("Cache-Control: max-age=0"); | |
$objWriter = PHPExcel_IOFactory::createWriter($phpExcel, "Excel5"); |
// enregistrement du fichier | |
$objWriter = PHPExcel_IOFactory::createWriter($objWorksheet, 'CSV'); | |
$objWriter->setEnclosure(""); | |
$objWriter->setDelimiter("\t"); | |
$objWriter->setLineEnding("\r\n"); // cr lf (Windows) | |
ob_start(); | |
$objWriter->save('php://output'); | |
$excelOutput = ob_get_clean(); | |
// conversion en iso-8859-1, car PHPExcel genere de l'utf-8 | |
$f = mb_convert_encoding($excelOutput, 'iso-8859-1'); |
#!/usr/bin/python | |
# Brahim MACHKOURI | |
import subprocess | |
import re | |
import urllib2 | |
# recupere la page web de webmin dediee a debian | |
response = urllib2.urlopen('http://www.webmin.com/deb.html') | |
html = response.read() |
# Apache files | |
syntax "apacheconf" "httpd\.conf|mime\.types|\.conf$" | |
color yellow ".+" | |
color brightcyan "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)" | |
color brightcyan "(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)" | |
color brightcyan "(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)" | |
color brightcyan "(Anonymous_VerifyEmail|AssignUserID|AuthAuthoritative|AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm)" | |
color brightcyan "(AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)" | |
color brightcyan "(AuthGroupFile|AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLD |
Note The extension Imagick is now included in Ondrej's PPA. All you need to do now is
$ sudo apt-get install php-imagick
, and you're done. I'll keep the guide here because a lot of it is still true for other extensions
======
I've installed PHP7 via Ondrej's PPA. He maintains these PPA's on his free time, consider donating
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"fmt" | |
) | |
func EncryptAESCFB(dst, src, key, iv []byte) error { | |
aesBlockEncrypter, err := aes.NewCipher([]byte(key)) |
<?php | |
// Used code from the following sources: | |
// https://gist.github.com/styxit/e34d4c6f8cb23d55f5af#file-synology-pushover-php | |
// http://pastebin.com/iHAFAHGq | |
// Thanks to: https://styxit.com/2014/05/10/synology-pushover.html | |
// Only allow request made by localhost? |
#!/bin/bash | |
vms=$(vagrant global-status | awk -F " " '{ print $5 }' | grep Users) | |
for vm in $vms | |
do | |
if [ -d "$vm" ]; then | |
cat $vm/.vagrant/machines/default/virtualbox/index_uuid | |
echo " $vm" | |
fi | |
done |
server { | |
listen 80; | |
server_name localhost; | |
# ... other default site stuff, document root, etc. ... | |
location ~ ^/~(?<userdir_user>.+?)(?<userdir_uri>/.*)?$ { | |
alias /home/chroot/home/$userdir_user/public_html$userdir_uri; | |
index index.html index.htm index.php; | |
autoindex on; |