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
from opencv import cv as opencv | |
from opencv import highgui | |
import sys | |
print "Inizializzazione webcam" | |
camera = highgui.cvCreateCameraCapture(-1) | |
if (camera): | |
print "Camera inizializzata" | |
else: |
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
<?php | |
$a = 0; | |
$b = ""; | |
if ($a != $b) { | |
echo "ehy, <$a> and <$b> are different!?!?!?!?!?\n"; | |
} else { | |
echo "ehy, <$a> and <$b> are the same!?!?!?!?!?\n"; | |
} | |
echo "ok, i was joking!\n"; | |
if ($a !== $b) { |
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
<?php | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
$config=array(); | |
$config["hostname"] = "my-hostname-with-magento.com"; | |
$config["login"] = "soapuser"; | |
$config["password"] = "soappassword"; | |
$config["customer_as_guest"] = TRUE; | |
$config["customer_id"] = 261; //only if you don't want as Guest |
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
<?php | |
$username = "user-name12"; | |
$exp = "/^[a-zA-Z\d\ \.-]{1,250}$/i"; | |
if (preg_match($exp, $username)) { | |
echo "Your username is ok."; | |
} else { | |
echo "Wrong username format."; | |
} |
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
NameVirtualHost *:80 | |
LogLevel debug | |
#RewriteLog logs/rewrite_log | |
#RewriteLogLevel 9 | |
<VirtualHost *:80> | |
UseCanonicalName Off | |
ServerName *.dev.local | |
VirtualDocumentRoot /Users/rbutti/Sites/httpd/%0/public |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" | |
# Example aliases |
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
PROJECTNAME=example | |
APPNAME=${PROJECTNAME}app | |
PROJECTDIR=${PROJECTNAME}_project | |
ENVNAME=${PROJECTNAME}env | |
SITENAME=${PROJECTNAME}sitename | |
echo "I will create ${PROJECTDIR} for${PROJECTNAME}" | |
mkdir ${PROJECTDIR} | |
cd ${PROJECTDIR} |
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
Header unset Pragma | |
FileETag None | |
Header unset ETag | |
<FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif|css|js|mp3)$"> | |
Header set Cache-Control "public, s-maxage=600" | |
Header unset Last-Modified | |
#Header unset Cookie | |
#Header unset Set-Cookie | |
</FilesMatch> |
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
Show hidden characters
{ | |
"auto_indent": true, | |
"detect_indentation": true, | |
"font_size": 14, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"indent_to_bracket": false, | |
"smart_indent": true, |
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
#!/bin/bash | |
#update ports index | |
sudo port selfupdate | |
# install php version 7.0 :) | |
sudo port install php70 | |
# install php 7 as apache module | |
sudo port install php70-apache2handler | |
cd /opt/local/apache2/modules | |
sudo /opt/local/apache2/bin/apxs -a -e -n php7 mod_php70.so | |
cd |
OlderNewer